[
https://issues.apache.org/jira/browse/THRIFT-3385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15010932#comment-15010932
]
ASF GitHub Bot commented on THRIFT-3385:
----------------------------------------
Github user hcorg commented on a diff in the pull request:
https://github.com/apache/thrift/pull/688#discussion_r45195544
--- Diff: test/cpp/src/TestClient.cpp ---
@@ -488,7 +488,7 @@ int main(int argc, char** argv) {
testClient.testBinary(bin_result, string(bin_data, 256));
if (bin_result.size() != 256) {
printf("}\n*** FAILED ***\n");
- printf("invalid length: %lu\n", bin_result.size());
+ printf("invalid length: %zu\n", bin_result.size());
--- End diff --
Why constructing such complicated boost format line, when simple `cout <<`
is enough? :) simpler code == better code
Also - it is true - long term development should remove boost, especially
from compiler, to allow maximum ease of thrift portability for 'non-C++' users
> warning: format ‘%lu’ expects ‘long unsigned int’, but has type
> ‘std::basic_string<char>::size_type {aka unsigned int}
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-3385
> URL: https://issues.apache.org/jira/browse/THRIFT-3385
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Reporter: Jens Geyer
> Assignee: Jens Geyer
> Priority: Minor
> Fix For: 1.0
>
> Attachments:
> THRIFT-3385-warning-format-lu-expects-long-unsigned-.patch
>
>
> {{make check}} for C++ produces the following:
> {code}
> src/TestClient.cpp: In function ‘int main(int, char**)’:
> src/TestClient.cpp:486:58: warning: format ‘%lu’ expects argument of type
> ‘long unsigned int’, but argument 2 has type
> ‘std::basic_string<char>::size_type {aka unsigned int}’ [-Wformat=]
> {code}
> ___
> EDIT: sorry for the noise
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)