xbolva00 added a comment. In D122271#3413193 <https://reviews.llvm.org/D122271#3413193>, @uabelho wrote:
> Hi, > > I noticed these to warning when compiling libunwind/src/UnwindLevel1.c with > this patch: > > 00:22:48 > /repo/bbiswjenk/fem2s10-eiffel176/workspace/llvm/sdk_1_20_ki_dev_test/libunwind/src/UnwindLevel1.c:175:12: > warning: variable 'framesWalked' set but not used [-Wunused-but-set-variable] > 00:22:48 unsigned framesWalked = 1; > 00:22:48 ^ > 00:22:48 > /repo/bbiswjenk/fem2s10-eiffel176/workspace/llvm/sdk_1_20_ki_dev_test/libunwind/src/UnwindLevel1.c:293:12: > warning: variable 'framesWalked' set but not used [-Wunused-but-set-variable] > 00:22:48 unsigned framesWalked = 1; > 00:22:48 ^ > 00:22:48 2 warnings generated. In D122271#3413193 <https://reviews.llvm.org/D122271#3413193>, @uabelho wrote: > Hi, > > I noticed these to warning when compiling libunwind/src/UnwindLevel1.c with > this patch: > > 00:22:48 > /repo/bbiswjenk/fem2s10-eiffel176/workspace/llvm/sdk_1_20_ki_dev_test/libunwind/src/UnwindLevel1.c:175:12: > warning: variable 'framesWalked' set but not used [-Wunused-but-set-variable] > 00:22:48 unsigned framesWalked = 1; > 00:22:48 ^ > 00:22:48 > /repo/bbiswjenk/fem2s10-eiffel176/workspace/llvm/sdk_1_20_ki_dev_test/libunwind/src/UnwindLevel1.c:293:12: > warning: variable 'framesWalked' set but not used [-Wunused-but-set-variable] > 00:22:48 unsigned framesWalked = 1; > 00:22:48 ^ > 00:22:48 2 warnings generated. A warning was improved so fires more often. Clearly, sometimes in __unw_phase2_resume, “fn” is ignored (so passed framesWalked is throw away as well). I see nothing wrong to warn here. (void)framesWalked; will silence it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122271/new/ https://reviews.llvm.org/D122271 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits