Fix -Werror=cast-align error on 32 bit platform
Fixes GH-172
This commit is contained in:
parent
4de8db523f
commit
dbd0f032ce
|
@ -39,6 +39,7 @@ PATH=$TOOLCHAIN/bin:$PATH
|
|||
--without-libxml2 \
|
||||
--disable-python-bindings \
|
||||
--disable-examples \
|
||||
--enable-werror \
|
||||
CC=clang \
|
||||
CXX=clang++ \
|
||||
CPPFLAGS="-I$PREFIX/include" \
|
||||
|
|
|
@ -549,6 +549,10 @@ if test "x$have_struct_tm_tm_gmtoff" = "xyes"; then
|
|||
[Define to 1 if you have `struct tm.tm_gmtoff` member.])
|
||||
fi
|
||||
|
||||
# Check size of pointer to decide we need 8 bytes alignment
|
||||
# adjustment.
|
||||
AC_CHECK_SIZEOF([int *])
|
||||
|
||||
# Checks for library functions.
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
AC_FUNC_MALLOC
|
||||
|
|
|
@ -40,6 +40,10 @@ typedef uint32_t key_type;
|
|||
typedef struct nghttp2_map_entry {
|
||||
struct nghttp2_map_entry *next;
|
||||
key_type key;
|
||||
#if SIZEOF_INT_P == 4
|
||||
/* we requires 8 bytes aligment */
|
||||
int64_t pad;
|
||||
#endif
|
||||
} nghttp2_map_entry;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -119,6 +119,7 @@ static int stream_push_item(nghttp2_stream *stream, nghttp2_session *session) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
rv = 0;
|
||||
/* should not reach here */
|
||||
assert(0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue