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

i64 related warnings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • C glib - Compiler
    • None

    Description

      I get multiple warnings all related to i64 constants:

      • warning: this decimal constant is unsigned only in ISO C90 (enabled by default)
      • warning: integer constant is too large for 'long' type (-Wlong-long)
      /bin/sh ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift  -I../src -Wno-unused-function  -g -Wall -Wextra -pedantic -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -g -O2 -MT gen-c_glib/libtestgenc_la-t_test_debug_proto_test_types.lo -MD -MP -MF gen-c_glib/.deps/libtestgenc_la-t_test_debug_proto_test_types.Tpo -c -o gen-c_glib/libtestgenc_la-t_test_debug_proto_test_types.lo `test -f 'gen-c_glib/t_test_debug_proto_test_types.c' || echo './'`gen-c_glib/t_test_debug_proto_test_types.c
      libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src/thrift -I../src -Wno-unused-function -g -Wall -Wextra -pedantic -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT gen-c_glib/libtestgenc_la-t_test_debug_proto_test_types.lo -MD -MP -MF gen-c_glib/.deps/libtestgenc_la-t_test_debug_proto_test_types.Tpo -c gen-c_glib/t_test_debug_proto_test_types.c  -fPIC -DPIC -o gen-c_glib/.libs/libtestgenc_la-t_test_debug_proto_test_types.o
      gen-c_glib/t_test_debug_proto_test_types.c: In function 't_test_one_of_each_instance_init':
      gen-c_glib/t_test_debug_proto_test_types.c:1271:3: warning: integer constant is too large for 'long' type [-Wlong-long]
         object->integer64 = 10000000000;
         ^
      gen-c_glib/t_test_debug_proto_test_types.c: In function 't_test_compact_test_constant_i64_list250_constant':
      gen-c_glib/t_test_debug_proto_test_types.c:16023:5: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]
           gint64 compact_test_constant_i64_list250256 = 4294967295;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16024:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_list250257 = 1099511627775;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16025:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_list250258 = 281474976710655;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16026:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_list250259 = 72057594037927935;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16027:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_list250260 = 9223372036854775807;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c: In function 't_test_compact_test_constant_i64_set294_constant':
      gen-c_glib/t_test_debug_proto_test_types.c:16206:5: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]
           gint64 compact_test_constant_i64_set294300 = 4294967295;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16207:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_set294301 = 1099511627775;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16208:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_set294302 = 281474976710655;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16209:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_set294303 = 72057594037927935;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c:16210:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           gint64 compact_test_constant_i64_set294304 = 9223372036854775807;
           ^
      gen-c_glib/t_test_debug_proto_test_types.c: In function 't_test_compact_test_constant':
      gen-c_glib/t_test_debug_proto_test_types.c:16545:5: warning: integer constant is too large for 'long' type [-Wlong-long]
           constant->a_i64 = 1099511627775;
           ^
      

      Attachments

        Activity

          People

            simonsouth Simon South
            jensg Jens Geyer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: