Compile error on Gentoo Linux: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result

116 views
Skip to first unread message

Christian van der Leeden

unread,
Aug 6, 2010, 5:35:33 AM8/6/10
to mongodb-user
MongoVersion: 1.6.0
g++ (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4


When compiling on Linux (Gentoo) I get an error saying that:
ignoring return value of 'size_t fwrite(const void*, size_t, size_t,
FILE*)', declared with attribute warn_unused_result

This error/warning is already in 1.5.x but there it is not reported as
error,

Fix:
remove the -Werror flag from SConstruct which will abort the compile
(or fix the problem of the warning in the first place)

Christian




--- mongodb-src-r1.6.0/SConstruct 2010-08-05 15:32:06.000000000 +0200
+++ mongodb-src-r1.6.0-r1/SConstruct 2010-08-06 11:20:46.000000000
+0200
@@ -745,8 +745,6 @@ else:

if nix:
env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -
Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
- if linux:
- env.Append( CPPFLAGS=" -Werror " )
env.Append( CXXFLAGS=" -Wnon-virtual-dtor " )
env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
env.Append( LIBS=[] )

Eliot Horowitz

unread,
Aug 6, 2010, 9:39:41 AM8/6/10
to mongod...@googlegroups.com
Can track progress here: http://jira.mongodb.org/browse/SERVER-1578

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages