[
https://issues.apache.org/jira/browse/THRIFT-2795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653647#comment-14653647
]
Simon South commented on THRIFT-2795:
-------------------------------------
These warnings are among those resolved by the fix for THRIFT-3285 and it
should now be safe to mark this issue fixed as well.
> 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
> Components: Build Process, C glib - Library
> Affects Versions: 0.9.1
> Reporter: Anatol Pomozov
> Assignee: Simon South
> Priority: Minor
> Labels: c_glib, library
>
> I am trying to compile the project on Linux Arch (gcc 4.9.1) and I see
> following error:
> {quote}
> 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
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)