]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Fix indentation in coregrind/m_debuginfo/readpdb.c (DEBUG_SnarfLinetab)
authorMark Wielaard <mark@klomp.org>
Sat, 23 Jan 2021 19:22:28 +0000 (20:22 +0100)
committerMark Wielaard <mark@klomp.org>
Sat, 23 Jan 2021 19:26:28 +0000 (20:26 +0100)
commitfef5935c7e70260bc9557c3bfb3a891584da4e91
tree8f855201e8ebe2d8170feebbe0fa6c05a24b30b1
parent8fa9e36f7c269563feebbf41a7a658bc7879ad39
Fix indentation in coregrind/m_debuginfo/readpdb.c (DEBUG_SnarfLinetab)

GCC warns:

readpdb.c:1631:16: warning: this 'if' clause does not guard...
  [-Wmisleading-indentation]
 1631 |                if (debug)
      |                ^~
In file included from ./pub_core_basics.h:38,
                 from m_debuginfo/readpdb.c:38:
../include/pub_tool_basics.h:69:30: note: ...this statement, but the latter
  is misleadingly indented as if it were guarded by the 'if'
   69 | #define ML_(str)    VGAPPEND(vgModuleLocal_,    str)
      |                              ^~~~~~~~~~~~~~
../include/pub_tool_basics.h:66:29: note: in definition of macro 'VGAPPEND'
   66 | #define VGAPPEND(str1,str2) str1##str2
      |                             ^~~~
m_debuginfo/readpdb.c:1636:19: note: in expansion of macro 'ML_'
 1636 |                   ML_(addLineInfo)(
      |                   ^~~

The warning message is slightly hard to read because of the macro expansion.
But GCC is right that the indentation is misleading. Fixed by reindenting.
coregrind/m_debuginfo/readpdb.c