Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3266

c_glib: Multiple compiler warnings building unit tests

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.3
    • Component/s: C glib - Library
    • Labels:
    • Environment:

      Fedora 20 (gcc 4.8.3) on x86_64

    • Patch Info:
      Patch Available
    • Flags:
      Patch

      Description

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

      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 ();
                      ^
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simonsouth Simon South
                Reporter:
                simonsouth Simon South
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: