]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Address compiler warnings (ics-openconnect build)
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Tue, 7 Jan 2025 17:28:32 +0000 (18:28 +0100)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Tue, 7 Jan 2025 17:36:28 +0000 (18:36 +0100)
They are caused by the use of the GCC options:
  -Wparentheses
  -Wunused-function

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
gnutls.c
gpst.c

index 6c2e3aec29c1c0db60509ed7893de7d603043719..fc89d08ec958b4ca318d12b4ec3f0dc6c9ac9487 100644 (file)
--- a/gnutls.c
+++ b/gnutls.c
@@ -908,6 +908,7 @@ static int import_openssl_pem(struct openconnect_info *vpninfo, struct cert_info
        return ret;
 }
 
+#if defined(HAVE_P11KIT)
 static void fill_token_info(char *buf, size_t s, unsigned char *dst, size_t dstlen)
 {
        if (s && !gtls_ver(3,6,0))
@@ -918,6 +919,7 @@ static void fill_token_info(char *buf, size_t s, unsigned char *dst, size_t dstl
        if (s < dstlen)
                memset(dst + s, ' ', dstlen - s);
 }
+#endif
 
 struct gtls_cert_info {
        gnutls_x509_crl_t crl;
diff --git a/gpst.c b/gpst.c
index cb3ff89e58b903a3dd9b3e3d14045b67ccd09717..3450c2160f0deb182d76b0fd73a15287e875ad6b 100644 (file)
--- a/gpst.c
+++ b/gpst.c
@@ -1153,7 +1153,7 @@ int gpst_mainloop(struct openconnect_info *vpninfo, int *timeout, int readable)
                                     _("Failed to connect ESP tunnel; using HTTPS instead.\n"));
                /* XX: gpst_connect does nothing if ESP is enabled and has secrets */
                vpninfo->dtls_state = DTLS_NOSECRET;
-               if (ret = gpst_connect(vpninfo)) {
+               if ((ret = gpst_connect(vpninfo))) {
                        vpninfo->quit_reason = "GPST connect failed";
                        return ret;
                }
@@ -1311,7 +1311,7 @@ int gpst_mainloop(struct openconnect_info *vpninfo, int *timeout, int readable)
                        return ret;
                }
                /* XX: no need to do_reconnect, since ESP doesn't need reconnection */
-               if (ret = gpst_connect(vpninfo))
+               if ((ret = gpst_connect(vpninfo)))
                        vpninfo->quit_reason = "GPST connect failed";
                return ret;
        }