Chenxi Mao 8ead6f86eb Fix build error if compiler is clang
There is a build error if compiler is clang:
clang -O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/generic-hardened-clang.cfg -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection  -Wall -Werror -I../src -g -O2 -Wno-stringop-overflow -DTEST_NAME=\"cases/3.t\" -o cases/3.p main.c ../src/libaio.a -lpthread
error: unknown warning option '-Wno-stringop-overflow'; did you mean '-Wno-shift-overflow'? [-Werror,-Wunknown-warning-option]

./cases/13.t:38:26: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                 struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
                                        ^~~~~~~
                                        .tv_sec =
./cases/13.t:38:38: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                 struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
                                                   ^~~~~~~~
                                                   .tv_nsec =
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
2023-04-12 15:39:52 +08:00
2022-11-01 15:01:36 +08:00
2020-06-12 18:14:38 +08:00
Description
No description provided
199 KiB
Languages
Diff 100%