[
https://issues.apache.org/jira/browse/THRIFT-916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christian Lavoie updated THRIFT-916:
------------------------------------
Attachment: v1-fix-format-strings.patch
v1-fix-random-silly-warnings.patch
Makes _almost_ everything (C++) compile with {{-Wall}} on my box,
{{thriftl.cc}} still has a few warnings:
{noformat}
g++ -DHAVE_CONFIG_H -I. -I../.. -Wall -Wall -I./src -Wall -MT
thrift-thriftl.o -MD -MP -MF .deps/thrift-thriftl.Tpo -c -o thrift-thriftl.o
`test -f 'thriftl.cc' || echo './'`thriftl.cc
thriftl.cc: In function 'int yylex()':
thriftl.cc:1651: warning: comparison between signed and unsigned integer
expressions
thriftl.cc: At global scope:
thriftl.cc:2877: warning: 'void yyunput(int, char*)' defined but not used
thriftl.cc:3531: warning: 'int yy_flex_strlen(const char*)' defined but not used
{noformat}
I haven't had time to look into {{-Wextra}} or {{-pedantic}} yet; though to be
fully honest I find either to have much less useful value.
The {{fix-random-silly-warnings}} patch should be safe on all OSes. I'm a wee
bit leery of the {{fix-format-strings}} patch, and would love it if someone on
a not-Mac not-64-bit OS could test it.
> 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.