Skip to content

Conversation

@reshke
Copy link
Contributor

@reshke reshke commented Aug 12, 2024

I compile cloudberry on jammy and it errors like this


reshke@ygp-jammy:~/cloudberrydb/gpcontrib/gp_sparse_vector$ gcc -Wall -Wmissing-prototypes -Wpointer-arith -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-but-set-variable -Werror=implicit-fallthrough=3 -Wno-format-truncation -Wno-stringop-truncation -g -g -O2  -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fno-lto -Wall -fPIC  -DUSE_INTERNAL_FTS=1  -Werror=uninitialized -Werror -std=gnu99 -fsigned-char -fPIC -I. -I. -I../../src/include   -Wdate-time -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer -fno-lto -fno-fat-lto-objects -Wall -D_GNU_SOURCE -I/usr/include/libxml2   -c -o SparseData.o SparseData.c
In file included from SparseData.c:21:
In function ‘compword_to_int8’,
    inlined from ‘sdata_to_float8arr’ at SparseData.c:248:14:
SparseData.h:291:16: error: ‘num’ may be used uninitialized [-Werror=maybe-uninitialized]
  291 |         return num;
      |                ^~~
SparseData.c: In function ‘sdata_to_float8arr’:
SparseData.h:255:15: note: ‘num’ declared here
  255 |         int64 num;
      |               ^~~
In function ‘compword_to_int8’,
    inlined from ‘sdata_index_to_int64arr’ at SparseData.c:274:17:
SparseData.h:291:16: error: ‘num’ may be used uninitialized [-Werror=maybe-uninitialized]
  291 |         return num;
      |                ^~~
SparseData.c: In function ‘sdata_index_to_int64arr’:
SparseData.h:255:15: note: ‘num’ declared here
  255 |         int64 num;
      |               ^~~
cc1: all warnings being treated as errors

Provided patch suppresses this.

@reshke reshke changed the title Suppresses compile time error in SparseData.h Suppress compile time error in SparseData.h Aug 12, 2024
@reshke reshke changed the title Suppress compile time error in SparseData.h Suppress compile-time error in SparseData.h Aug 13, 2024
@my-ship-it my-ship-it merged commit e3a790c into apache:main Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants