strongswan / davici

Decoupled Asynchronous VICI
GNU Lesser General Public License v2.1
20 stars 18 forks source link

GCC11 compiler compatibility #11

Open amvarunn opened 1 year ago

amvarunn commented 1 year ago

The GCC11 compiler throws the following warning. Requesting to make necessary changes in source code to stop the warnings. Thank you

/strongswan/davici/davici.c:797:27: error: 'req' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  797 |                 cur->next = r;
      |                 ~~~~~~~~~~^~~
/strongswan/davici/davici.c:859:32: note: 'req' was declared here
  859 |         struct davici_request *req;
      |                                ^~~
/strongswan/davici/davici.c: In function 'davici_unregister':
/strongswan/davici/davici.c:797:27: error: 'req' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  797 |                 cur->next = r;
      |                 ~~~~~~~~~~^~~
/strongswan/davici/davici.c:877:32: note: 'req' was declared here
  877 |         struct davici_request *req;
      |                                ^~~