Simon South created THRIFT-3266:
-----------------------------------

             Summary: Multiple compiler warnings building C (GLib) unit tests
                 Key: THRIFT-3266
                 URL: https://issues.apache.org/jira/browse/THRIFT-3266
             Project: Thrift
          Issue Type: Improvement
          Components: C glib - Library
    Affects Versions: 1.0
         Environment: Fedora 20 (gcc 4.8.3) on x86_64
            Reporter: Simon South
            Assignee: Simon South
            Priority: Minor


Building the unit tests for C (GLib) (under {{lib/c_glib/test}}) generates a 
lot of compiler warnings:

{code}
gen-c_glib/t_test_debug_proto_test_types.c:16496:1: warning: 
't_test_compact_test_constant' defined but not used [-Wunused-function]
 t_test_compact_test_constant (void)
 ^
gen-c_glib/t_test_debug_proto_test_types.c:16596:1: warning: 
't_test_my_enum_map_constant' defined but not used [-Wunused-function]
 t_test_my_enum_map_constant (void)
 ^
gen-c_glib/t_test_debug_proto_test_types.c:16608:1: warning: 
't_test_extra_crazy_map_constant' defined but not used [-Wunused-function]
 t_test_extra_crazy_map_constant (void)
 ^
testtransportsocket.c: In function ‘main’:
testtransportsocket.c:313:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testbinaryprotocol.c: In function ‘test_read_and_write_primitives’:
testbinaryprotocol.c:195:5: warning: implicit declaration of function ‘wait’ 
[-Wimplicit-function-declaration]
     assert (wait (&status) == pid);
     ^
testbinaryprotocol.c: In function ‘main’:
testbinaryprotocol.c:663:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testbufferedtransport.c: In function ‘test_read_and_write’:
testbufferedtransport.c:154:5: warning: implicit declaration of function ‘wait’ 
[-Wimplicit-function-declaration]
     assert ( wait (&status) == pid );
     ^
testbufferedtransport.c: In function ‘main’:
testbufferedtransport.c:276:3: warning: ‘g_type_init’ is deprecated (declared 
at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testframedtransport.c: In function ‘test_read_and_write’:
testframedtransport.c:142:5: warning: implicit declaration of function ‘wait’ 
[-Wimplicit-function-declaration]
     assert ( wait (&status) == pid );
     ^
testframedtransport.c: In function ‘main’:
testframedtransport.c:274:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testmemorybuffer.c: In function ‘main’:
testmemorybuffer.c:87:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
teststruct.c: In function ‘main’:
teststruct.c:95:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testsimpleserver.c: In function ‘main’:
testsimpleserver.c:109:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testoptionalrequired.c: In function ‘main’:
testoptionalrequired.c:193:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testthrifttest.c: In function ‘main’:
testthrifttest.c:22:3: warning: ‘g_type_init’ is deprecated (declared at 
/usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
   g_type_init();
   ^
testthrifttest.c:25:3: warning: passing argument 2 of ‘g_test_add_func’ from 
incompatible pointer type [enabled by default]
   g_test_add_func ("/testthrift/Server", test_thrift_server);
   ^
In file included from /usr/include/glib-2.0/glib.h:84:0,
                 from /usr/include/glib-2.0/gobject/gbinding.h:30,
                 from /usr/include/glib-2.0/glib-object.h:25,
                 from 
../src/thrift/c_glib/transport/thrift_server_transport.h:23,
                 from testthrifttest.c:4:
/usr/include/glib-2.0/glib/gtestutils.h:128:9: note: expected ‘GTestFunc’ but 
argument is of type ‘void (*)(const int)’
 void    g_test_add_func                 (const char     *testpath,
         ^
testthrifttestclient.cpp: In function ‘void test_thrift_client()’:
testthrifttestclient.cpp:358:3: warning: ‘void g_type_init()’ is deprecated 
(declared at /usr/include/glib-2.0/gobject/gtype.h:669) 
[-Wdeprecated-declarations]
   g_type_init ();
   ^
testthrifttestclient.cpp:358:16: warning: ‘void g_type_init()’ is deprecated 
(declared at /usr/include/glib-2.0/gobject/gtype.h:669) 
[-Wdeprecated-declarations]
   g_type_init ();
                ^
{code}



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

Reply via email to