You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Anatol Pomozov (JIRA)" <ji...@apache.org> on 2014/11/03 05:15:33 UTC

[jira] [Created] (THRIFT-2795) thrift_binary_protocol.c: 'dereferencing type-punned pointer will break strict-aliasing rules'

Anatol Pomozov created THRIFT-2795:
--------------------------------------

             Summary: thrift_binary_protocol.c: 'dereferencing type-punned pointer will break strict-aliasing rules'
                 Key: THRIFT-2795
                 URL: https://issues.apache.org/jira/browse/THRIFT-2795
             Project: Thrift
          Issue Type: Bug
    Affects Versions: 0.9.1
            Reporter: Anatol Pomozov
            Priority: Minor


I am trying to compile the project on Linux Arch (gcc 4.9.1) and I see following error:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -D_FORTIFY_SOURCE=2 -O2 -g -Wall -W -Werror -Isrc -I src/thrift/c_glib -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -MT libthrift_c_glib_la-thrift_binary_protocol.lo -MD -MP -MF .deps/libthrift_c_glib_la-thrift_binary_protocol.Tpo -c src/thrift/c_glib/protocol/thrift_binary_protocol.c  -fPIC -DPIC -o .libs/libthrift_c_glib_la-thrift_binary_protocol.o
src/thrift/c_glib/protocol/thrift_binary_protocol.c: In function 'thrift_binary_protocol_read_i16':
src/thrift/c_glib/protocol/thrift_binary_protocol.c:672:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   *value = *(gint16 *) b;
   ^
src/thrift/c_glib/protocol/thrift_binary_protocol.c: In function 'thrift_binary_protocol_read_i32':
src/thrift/c_glib/protocol/thrift_binary_protocol.c:691:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   *value = *(gint32 *) b;
   ^
src/thrift/c_glib/protocol/thrift_binary_protocol.c: In function 'thrift_binary_protocol_read_i64':
src/thrift/c_glib/protocol/thrift_binary_protocol.c:710:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   *value = *(gint64 *) b;
   ^
src/thrift/c_glib/protocol/thrift_binary_protocol.c: In function 'thrift_binary_protocol_read_double':
src/thrift/c_glib/protocol/thrift_binary_protocol.c:729:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   guint64 bits = *(guint64 *) b;
   ^
cc1: all warnings being treated as errors




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