https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105210
Bug ID: 105210 Summary: gcc/auto-profile.cc:391:11: warning: variable 'level' set but not used Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- A compile of recent gcc trunk with clang trunk shows that local variable level is set but not used. $ fgrep level ../trunk.git/gcc/auto-profile.cc level information (not source level). This info is used to help This will be enforced when instruction-level discriminator function is a top-level function_instance, i.e. it is the original copy /* For a given DECL, returns the top-level function_instance. */ int level = 0; level++; /* For a given DECL, returns the top-level function_instance. */ $ Suggest remove local variable.