HomeClusterLabs Projects

links.c: Fix build with gcc-12

Description

links.c: Fix build with gcc-12

Fix the build failure with gcc-12 when -Og pass to CFLAGS.

| /build/tmp-glibc/work/corei7-64-wrs-linux/kronosnet/1.22-r0/recipe-sysroot/usr/include/bits/string_fortified.h:59:10: error: 'link' may be used uninitialized [-Werror=maybe-uninitialized]
|    59 |   return __builtin___memset_chk (__dest, __ch, __len,
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|    60 |                                  __glibc_objsize0 (__dest));
|       |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
| ../../git/libknet/links.c: In function 'knet_link_set_config':
| ../../git/libknet/links.c:108:27: note: 'link' was declared here
|   108 |         struct knet_link *link;
|       |                           ^~~~
| cc1: all warnings being treated as errors

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>

Details

Provenance
Mingli Yu <mingli.yu@windriver.com>Authored on Jun 9 2022, 4:03 AM
fabbioneCommitted on Jun 9 2022, 12:17 PM
Parents
rK682dbeb48164: Fix comment typo: Minumum -> Minimum
Branches
Unknown
Tags
Unknown

Event Timeline