[
https://issues.apache.org/jira/browse/THRIFT-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933090#action_12933090
]
Christian Lavoie commented on THRIFT-916:
-----------------------------------------
Hey Roger, here's the grepped warnings on OS X (10.6):
{noformat}
$ ../grep-warnings.sh ./mak
e-j2-check.log
mv -f .deps/thrift-thrifty.Tpo .deps/thrift-thrifty.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -Wall -Wextra -Wall -I./src -Wall -Wextra -MT
thrift-main.o -MD -MP -MF .deps/thrift-main.Tpo -c -o thrift-main.o `test -f
'src/main.cc' || echo './'`src/main.cc
thriftl.cc: In function 'int yylex()':
thriftl.cc:1655: warning: comparison between signed and unsigned integer
expressions
thriftl.cc: At global scope:
thriftl.cc:3494: warning: 'int yy_flex_strlen(const char*)' defined but not used
mv -f .deps/thrift-thriftl.Tpo .deps/thrift-thriftl.Po
gcc -DHAVE_CONFIG_H -I. -I../.. -Wall -Wextra -Wall -Wextra -MT md5.o -MD
-MP -MF .deps/md5.Tpo -c -o md5.o `test -f 'src/md5.c' || echo './'`src/md5.c
mv -f .deps/md5.Tpo .deps/md5.Po
--
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../.. -I/opt/local/include -I./src -Wall -Wextra -Wall -Wall -Wextra -MT
Monitor.lo -MD -MP -MF .deps/Monitor.Tpo -c -o Monitor.lo `test -f
'src/concurrency/Monitor.cpp' || echo './'`src/concurrency/Monitor.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT Mutex.lo -MD -MP -MF .deps/Mutex.Tpo -c
src/concurrency/Mutex.cpp -fno-common -DPIC -o .libs/Mutex.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT Monitor.lo -MD -MP -MF .deps/Monitor.Tpo
-c src/concurrency/Monitor.cpp -fno-common -DPIC -o .libs/Monitor.o
src/concurrency/Mutex.cpp:137: warning: unused parameter 'milliseconds'
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT Mutex.lo -MD -MP -MF .deps/Mutex.Tpo -c
src/concurrency/Mutex.cpp -o Mutex.o >/dev/null 2>&1
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT Monitor.lo -MD -MP -MF .deps/Monitor.Tpo
-c src/concurrency/Monitor.cpp -o Monitor.o >/dev/null 2>&1
mv -f .deps/Mutex.Tpo .deps/Mutex.Plo
--
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../.. -I/opt/local/include -I./src -Wall -Wextra -Wall -Wall -Wextra -MT
TSimpleFileTransport.lo -MD -MP -MF .deps/TSimpleFileTransport.Tpo -c -o
TSimpleFileTransport.lo `test -f 'src/transport/TSimpleFileTransport.cpp' ||
echo './'`src/transport/TSimpleFileTransport.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT TFileTransport.lo -MD -MP -MF
.deps/TFileTransport.Tpo -c src/transport/TFileTransport.cpp -fno-common -DPIC
-o .libs/TFileTransport.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT TSimpleFileTransport.lo -MD -MP -MF
.deps/TSimpleFileTransport.Tpo -c src/transport/TSimpleFileTransport.cpp
-fno-common -DPIC -o .libs/TSimpleFileTransport.o
src/transport/TFileTransport.cpp:58: warning: unused parameter 'clk_id'
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT TFileTransport.lo -MD -MP -MF
.deps/TFileTransport.Tpo -c src/transport/TFileTransport.cpp -o
TFileTransport.o >/dev/null 2>&1
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I./src
-Wall -Wextra -Wall -Wall -Wextra -MT TSimpleFileTransport.lo -MD -MP -MF
.deps/TSimpleFileTransport.Tpo -c src/transport/TSimpleFileTransport.cpp -o
TSimpleFileTransport.o >/dev/null 2>&1
mv -f .deps/TFileTransport.Tpo .deps/TFileTransport.Plo
--
*** No errors detected
PASS: ZlibTest
Running 5 test cases...
TFileTransportTest.cpp:277: error in "test_flush_max_us1": check calls->size()
> static_cast<FsyncLog::CallList::size_type>(1) failed [1 <= 1]
TFileTransportTest.cpp:277: error in "test_flush_max_us2": check calls->size()
> static_cast<FsyncLog::CallList::size_type>(1) failed [1 <= 1]
TFileTransportTest.cpp:277: error in "test_flush_max_us3": check calls->size()
> static_cast<FsyncLog::CallList::size_type>(1) failed [1 <= 1]
*** 3 failures detected in test suite "TFileTransportTest"
FAIL: TFileTransportTest
{noformat}
The test failure is not related to your patch, nor is the {{thriftl.cc}} stuff,
it happens with or without it. I ran:
{noformat}
./bootstrap.sh
export CFLAGS="-Wall -Wextra"
export CXXFLAGS="-Wall -Wextra"
export CPPFLAGS="-Wall -Wextra"
./configure --prefix=/usr/local/stow/thrift-svn-20101117-THRIFT-916
--without-java --without-python --without-perl --without-ruby --without-php
--without-php_extension --without-haskell --with-cpp
make -j2 check >& make-j2-check.log
{noformat}
On a fresh SVN checkout, on a machine that runs:
{noformat}
$ uname -a ; g++ --version ; flex --version ; port list | grep boo
st
Darwin --10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010;
root:xnu-1504.9.17~1/RELEASE_I386 i386
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
flex 2.5.35
boost @1.44.0 devel/boost
boost-build @2.0-m12 devel/boost-build
boost-gil-numeric @1.0 devel/boost-gil-numeric
boost-jam @3.1.18 devel/boost-jam
{noformat}
> gcc warnings in c++ header files
> --------------------------------
>
> Key: THRIFT-916
> URL: https://issues.apache.org/jira/browse/THRIFT-916
> Project: Thrift
> Issue Type: Improvement
> Components: C++ - Library
> Affects Versions: 0.4
> Reporter: Piotr Bartosiewicz
> Assignee: Roger Meier
> Attachments: DebianLenny_error.log, make-k.log,
> THRIFT-916_Wall_pedantic__noerrors.patch,
> THRIFT-916_Wall_Wextra__NOWARNINGS_DebianLenny.patch,
> v1-enable-wall-werror.patch, v1-fix-format-strings.patch,
> v1-fix-java-style-and-warnings.patch, v1-fix-more-warnings.patch,
> v1-fix-random-silly-warnings.patch, v2-fix-all-warnings.patch,
> v3-fix-all-warnings.patch, v4-fix-all-warnings.patch
>
>
> I tried to add an extra gcc warning options in my project but a number of
> warnings was emmited from thrift headers.
> Following the boost library recommendations, code should be clean with "-Wall
> -Wextra -pedantic" options.
> Currently only with -Wall thrift has no warnings.
> Other options worth considering (but require more work) are -Wconversion
> -Wold-style-cast
> So the task is to improve the thrift headers.
> I suggest also update all the thrift makefiles so the thrift sources an tests
> will indicate the faulty code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.