Revert incorrect change to ci/tidy_warnings_debug.ref in 232dd1e9
Background
-
As part of a prior commit 232dd1e9,
ci/tidy_warnings_release.ref
needed to be changed. As part of that, I had also changedci/tidy_warnings_debug.ref
thinking it would be affected in a similar fashion. -
Below is the code change
sr_port/mupip_integ.c before 232dd1e9
799 assert(SNAPSHOTS_IN_PROG(csa)); 800 assert(NULL != csa->ss_ctx); 801 ss_release(&csa->ss_ctx); 802 CLEAR_SNAPSHOTS_IN_PROG(csa);
sr_port/mupip_integ.c after 232dd1e9
807 assert(SNAPSHOTS_IN_PROG(csa)); 808 ss_ctx = csa->ss_ctx; 809 assert(NULL != ss_ctx); 810 csa->ss_ctx = NULL; 811 CLEAR_SNAPSHOTS_IN_PROG(csa);
-
Before 232dd1e9, line 802 caused
csa->snapshot_in_prog
to be accessed in Release build and line 799 causedcsa->snapshot_in_prog
to be accessed in a Debug build. This in turn generated the following (false) alert from clang-tidy in both builds and hence needed to be included in both the Release and Debug reference files.mupip_integ.c:warning: Access to field 'snapshot_in_prog' results in a dereference of a null pointer (loaded from variable 'csa') [clang-analyzer-core.NullDereference]
-
But after 232dd1e9, line 807 continued to cause
csa->snapshot_in_prog
to be accessed in a Debug build whereas in a Release build, it is line 808 whose access ofcsa->ss_ctx
that generated the clang-tidy warning. Therefore the warning text change was needed only in the Release build and not for the Debug build.
Fix
- The fix is to revert the warning in the debug reference file
ci/tidy_warnings_debug.ref
to what it was before 232dd1e9.