On Mon, Oct 18, 2010 at 5:19 PM, Roger Meier (JIRA) <[email protected]> wrote:
> Christian, I just used both of your patches.
> some parts of them result in additional warnings..
> {code}
> thriftl.cc:1643: warning: label find_rule defined but not used
> thriftl.cc: At global scope:
> thriftl.cc:2890: warning: void yyunput(int, char*) defined but not used
> thriftl.cc:3545: warning: int yy_flex_strlen(const char*) defined but not used
These happen with or without my patches (on my box anyway), I've been
ignoring them for now.
> src/concurrency/Mutex.cpp:192:46: warning: extra tokens at end of #ifdef
> directive
> src/concurrency/ThreadManager.cpp: In member function virtual void
> apache::thrift::concurrency::ThreadManager::Impl::addWorker(size_t):
> src/concurrency/ThreadManager.cpp:342: warning: declaration class
> apache::thrift::concurrency::ThreadManager::Worker does not declare anything
> src/concurrency/TimerManager.cpp:63: warning: declaration struct
> apache::thrift::concurrency::TimerManager::Dispatcher does not declare
> anything
> src/transport/TFileTransport.cpp: In member function bool
Ok, those are a surprise to me, I'll investigate.
apache::thrift::transport::TFileTransport::isEventCorrupted():
> src/transport/TFileTransport.cpp:748: warning: format %lld expects type long
> long int, but argument 7 has type long int
> src/transport/TFileTransport.cpp: In member function void
> apache::thrift::transport::TFileTransport::performRecovery():
> src/transport/TFileTransport.cpp:789: warning: format %llu expects type long
> long unsigned int, but argument 3 has type long int
Yeah, I was afraid of exactly that -- this is why I was leery of the
fix-format-strings patch -- the variables passed to snprintf are
arch-dependant or OS-dependant, so there might be no portable way to
snprintf them (most likely, they might just need to be declared with a
fixed-width type). I'll investigate.
> src/transport/TFileTransport.cpp: In member function virtual void
> apache::thrift::transport::TFileTransport::seekToChunk(int32_t):
> src/transport/TFileTransport.cpp:846: warning: comparison between signed and
> unsigned integer expressions
> {code}
Another surprise. I'll investigate.
Thanks for running these on your machine, appreciated.
>
>> 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: make-k.log, THRIFT-916_Wall_pedantic__noerrors.patch,
>> v1-fix-format-strings.patch, v1-fix-java-style-and-warnings.patch,
>> v1-fix-random-silly-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.
>
>
--
Have fun, Christian
http://linkedin.christianlavoie.net
"I won't let you fall apart."