From: Mark Wielaard Date: Sat, 23 Jan 2021 19:22:28 +0000 (+0100) Subject: Fix indentation in coregrind/m_debuginfo/readpdb.c (DEBUG_SnarfLinetab) X-Git-Tag: VALGRIND_3_17_0~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fef5935c7e70260bc9557c3bfb3a891584da4e91;p=thirdparty%2Fvalgrind.git 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. --- diff --git a/coregrind/m_debuginfo/readpdb.c b/coregrind/m_debuginfo/readpdb.c index 6522383547..f9128e30cf 100644 --- a/coregrind/m_debuginfo/readpdb.c +++ b/coregrind/m_debuginfo/readpdb.c @@ -1633,16 +1633,16 @@ static ULong DEBUG_SnarfLinetab( " Adding line %d addr=%#lx end=%#lx\n", ((const unsigned short *)(pnt2.ui + linecount))[j], startaddr, endaddr ); - ML_(addLineInfo)( - di, - fnmdirstr_ix, - startaddr, endaddr, - ((const unsigned short *)(pnt2.ui + linecount))[j], j ); - n_lines_read++; - } + ML_(addLineInfo)( + di, + fnmdirstr_ix, + startaddr, endaddr, + ((const unsigned short *)(pnt2.ui + linecount))[j], j ); + n_lines_read++; } - } - } + } + } + } if (debug) VG_(umsg)("END SnarfLineTab linetab=%p size=%d\n",