Menu

#2 Warnings in source code due to FORTIFY_SOURCE

open
nobody
None
5
2011-05-19
2011-05-19
No

RHEL5's RPM automatically passes the following CXXFLAGS:

-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4

The "-Wp,-D_FORTIFY_SOURCE=2" causes about 15-20 warnings, breaking the build as Werror is used. Almost all are of the form:

igprof/src/trace-throw.cc:111: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result

Discussion


Log in to post a comment.

MongoDB Logo MongoDB