[ 
https://issues.apache.org/jira/browse/THRIFT-3385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer updated THRIFT-3385:
-------------------------------
    Description: 
{{make check}} for c_glib produces the following:

{code}
testthrifttestclient.cpp: In member function ‘virtual void 
TestHandler::testStruct(thrift::test::Xtruct&, const thrift::test::Xtruct&)’:
testthrifttestclient.cpp:99:145: warning: format ‘%ld’ expects argument of type 
‘long int’, but argument 5 has type ‘int64_t {aka long long int}’ [-Wformat=]
     printf("[C -> C++] testStruct({\"%s\", %d, %d, %ld})\n", 
thing.string_thing.c_str(), (int)thing.byte_thing, thing.i32_thing, 
thing.i64_thing);
                                                                                
                                                                 ^
testthrifttestclient.cpp: In member function ‘virtual void 
TestHandler::testNest(thrift::test::Xtruct2&, const thrift::test::Xtruct2&)’:
testthrifttestclient.cpp:105:191: warning: format ‘%ld’ expects argument of 
type ‘long int’, but argument 6 has type ‘int64_t {aka long long int}’ 
[-Wformat=]
     printf("[C -> C++] testNest({%d, {\"%s\", %d, %d, %ld}, %d})\n", 
(int)nest.byte_thing, thing.string_thing.c_str(), (int)thing.byte_thing, 
thing.i32_thing, thing.i64_thing, nest.i32_thing);
                                                                                
                                                                                
                               ^
testthrifttestclient.cpp: In member function ‘virtual thrift::test::UserId 
TestHandler::testTypedef(thrift::test::UserId)’:
testthrifttestclient.cpp:179:50: warning: format ‘%ld’ expects argument of type 
‘long int’, but argument 2 has type ‘thrift::test::UserId {aka long long int}’ 
[-Wformat=]
     printf("[C -> C++] testTypedef(%ld)\n", thing);
                                                  ^
testthrifttestclient.cpp: In member function ‘virtual void 
TestHandler::testInsanity(std::map<long long int, 
std::map<thrift::test::Numberz::type, thrift::test::Insanity> >&, const 
thrift::test::Insanity&)’:
testthrifttestclient.cpp:237:39: warning: format ‘%ld’ expects argument of type 
‘long int’, but argument 2 has type ‘long long int’ [-Wformat=]
       printf("%ld => {", i_iter->first);
                                       ^
testthrifttestclient.cpp:247:54: warning: format ‘%ld’ expects argument of type 
‘long int’, but argument 3 has type ‘long long int’ [-Wformat=]
           printf("%d => %ld, ", um->first, um->second);
                                                      ^
testthrifttestclient.cpp:255:116: warning: format ‘%ld’ expects argument of 
type ‘long int’, but argument 5 has type ‘int64_t {aka long long int}’ 
[-Wformat=]
           printf("{\"%s\", %d, %d, %ld}, ", x->string_thing.c_str(), 
(int)x->byte_thing, x->i32_thing, x->i64_thing);
{code}



  was:
{{make check}} for c_glib 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}




> 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: Sub-task
>          Components: C glib - Library
>            Reporter: Jens Geyer
>            Assignee: Simon South
>
> {{make check}} for c_glib produces the following:
> {code}
> testthrifttestclient.cpp: In member function ‘virtual void 
> TestHandler::testStruct(thrift::test::Xtruct&, const thrift::test::Xtruct&)’:
> testthrifttestclient.cpp:99:145: warning: format ‘%ld’ expects argument of 
> type ‘long int’, but argument 5 has type ‘int64_t {aka long long int}’ 
> [-Wformat=]
>      printf("[C -> C++] testStruct({\"%s\", %d, %d, %ld})\n", 
> thing.string_thing.c_str(), (int)thing.byte_thing, thing.i32_thing, 
> thing.i64_thing);
>                                                                               
>                                                                    ^
> testthrifttestclient.cpp: In member function ‘virtual void 
> TestHandler::testNest(thrift::test::Xtruct2&, const thrift::test::Xtruct2&)’:
> testthrifttestclient.cpp:105:191: warning: format ‘%ld’ expects argument of 
> type ‘long int’, but argument 6 has type ‘int64_t {aka long long int}’ 
> [-Wformat=]
>      printf("[C -> C++] testNest({%d, {\"%s\", %d, %d, %ld}, %d})\n", 
> (int)nest.byte_thing, thing.string_thing.c_str(), (int)thing.byte_thing, 
> thing.i32_thing, thing.i64_thing, nest.i32_thing);
>                                                                               
>                                                                               
>                                    ^
> testthrifttestclient.cpp: In member function ‘virtual thrift::test::UserId 
> TestHandler::testTypedef(thrift::test::UserId)’:
> testthrifttestclient.cpp:179:50: warning: format ‘%ld’ expects argument of 
> type ‘long int’, but argument 2 has type ‘thrift::test::UserId {aka long long 
> int}’ [-Wformat=]
>      printf("[C -> C++] testTypedef(%ld)\n", thing);
>                                                   ^
> testthrifttestclient.cpp: In member function ‘virtual void 
> TestHandler::testInsanity(std::map<long long int, 
> std::map<thrift::test::Numberz::type, thrift::test::Insanity> >&, const 
> thrift::test::Insanity&)’:
> testthrifttestclient.cpp:237:39: warning: format ‘%ld’ expects argument of 
> type ‘long int’, but argument 2 has type ‘long long int’ [-Wformat=]
>        printf("%ld => {", i_iter->first);
>                                        ^
> testthrifttestclient.cpp:247:54: warning: format ‘%ld’ expects argument of 
> type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat=]
>            printf("%d => %ld, ", um->first, um->second);
>                                                       ^
> testthrifttestclient.cpp:255:116: warning: format ‘%ld’ expects argument of 
> type ‘long int’, but argument 5 has type ‘int64_t {aka long long int}’ 
> [-Wformat=]
>            printf("{\"%s\", %d, %d, %ld}, ", x->string_thing.c_str(), 
> (int)x->byte_thing, x->i32_thing, x->i64_thing);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to