lkml.org 
[lkml]   [2016]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v18 0/9] Compile-time stack metadata validation

FYI, I got this build failure on allmodconfig-x86-64:

objtool.c:134:1: error: control reaches end of non-void function [-Werror=return-type]

that was with:

gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)

GCC 5.2.1 does not trigger this warning, which is I suspect why you have not seen
this in your own testing.

I applied the fix below: all paths that generate a nonzero error do an explicit
exit(), so return 0 is fine here.

Thanks,

Ingo

=====================>

tools/objtool/objtool.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c
index 4e53d272c0c3..46c326db4f46 100644
--- a/tools/objtool/objtool.c
+++ b/tools/objtool/objtool.c
@@ -131,4 +131,6 @@ int main(int argc, const char **argv)
cmd_usage();

handle_internal_command(argc, argv);
+
+ return 0;
}
\
 
 \ /
  Last update: 2016-02-28 08:41    [W:0.307 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site