Skip to content

Commit

Permalink
indxf: -Warray-bounds with flex. EED struct
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Dec 31, 2023
1 parent e649e4f commit 56d7c28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ endif()
if (WCHAR_T EQUAL 2)
set(HAVE_PCRE2_16 1)
endif()

if (NOT HAVE_MIMALLOC_OVERRIDE_H)
if (ENABLE_MIMALLOC)
message(WARNING "Should not ENABLE_MIMALLOC without mimalloc-override.h")
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ dnl wasm does not support -fstack-protector yet
if test x$enable_shared = xyes -a x$ac_compiler_gnu = xyes -a x$CC != xemcc; then
AX_COMPILER_FLAGS([WARN_CFLAGS],[AM_LDFLAGS],[$ax_is_release],
[-fno-semantic-interposition -fwrapv -fno-common -fvisibility=hidden \
-fno-strict-aliasing -ftrivial-auto-var-init=zero \
-fno-strict-aliasing -ftrivial-auto-var-init=zero -fstrict-flex-arrays=3 \
-fstack-protector-strong -fstack-clash-protection \
-fcf-protection=full -fno-delete-null-pointer-checks])
else
Expand Down
8 changes: 4 additions & 4 deletions include/dwg.h
Original file line number Diff line number Diff line change
Expand Up @@ -8079,17 +8079,17 @@ typedef struct _dwg_entity_eed_data
BITCODE_RS length; /* RC */
unsigned short codepage:15; /* RS_LE */
unsigned short is_tu:1;
char string[1]; /* inlined */
char string[]; /* inlined */
} eed_0;
struct { /* R2007+ 0 (1000) string */
BITCODE_RS length;
unsigned short _padding:15;
unsigned short is_tu:1;
DWGCHAR string[1]; /* inlined */
DWGCHAR string[]; /* inlined */
} eed_0_r2007;
struct { /* 1 (1001) handle, not in data */
char invalid[1]; // set the eed[0].handle to the used APPID instead
BITCODE_RS appid_index;
char invalid[]; // set the eed[0].handle to the used APPID instead
} eed_1;
struct { /* 2 (1002) "{" => 0 open, or "}" => 1 close */
BITCODE_RC close;
Expand All @@ -8099,7 +8099,7 @@ typedef struct _dwg_entity_eed_data
} eed_3;
struct { /* 4 (1004) binary */
BITCODE_RC length;
unsigned char data[1]; // inlined
unsigned char data[]; // inlined
} eed_4;
struct { /* 5 (1005) entity */
BITCODE_RLL entity;
Expand Down

0 comments on commit 56d7c28

Please sign in to comment.