]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
fix compilation issues with small and w/o debug
authorIlya Ponetayev <i.ponetaev@ndmsystems.com>
Fri, 17 Jun 2022 04:13:26 +0000 (07:13 +0300)
committerGert Doering <gert@greenie.muc.de>
Tue, 21 Jun 2022 12:13:27 +0000 (14:13 +0200)
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20220617041326.2744668-1-i.ponetaev@ndmsystems.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24476.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c
src/openvpn/mtcp.c
src/openvpn/packet_id.c
src/openvpn/reliable.c

index b0c62a859e977966b7b63d43e789924f567b0592..f06afc2980b4e91d784bfec958df84be675abe76 100644 (file)
@@ -2491,7 +2491,7 @@ frame_finalize_options(struct context *c, const struct options *o)
     size_t tailroom = headroom;
 
 #ifdef USE_COMP
-    msg(D_MTU_DEBUG, "MTU: adding %lu buffer tailroom for compression for %lu "
+    msg(D_MTU_DEBUG, "MTU: adding %zu buffer tailroom for compression for %zu "
         "bytes of payload",
         COMP_EXTRA_BUFFER(payload_size), payload_size);
     tailroom += COMP_EXTRA_BUFFER(payload_size);
index b725bebbddf43f1bd6eacf07cb6b50cd22796da8..b3c153fed495106d46ddce431a780f47b0416dd9 100644 (file)
@@ -72,6 +72,7 @@ struct ta_iow_flags
     unsigned int sock;
 };
 
+#ifdef ENABLE_DEBUG
 static const char *
 pract(int action)
 {
@@ -114,6 +115,7 @@ pract(int action)
             return "?";
     }
 }
+#endif /* ENABLE_DEBUG */
 
 static struct multi_instance *
 multi_create_instance_tcp(struct multi_context *m)
index e357909d7fd10325434d339389ae4d26a150f1a1..1872bd13fb3a4862f9a083f34f62c29d9f8147f2 100644 (file)
 #define SEQ_UNSEEN  ((time_t)0)
 #define SEQ_EXPIRED ((time_t)1)
 
+#ifdef ENABLE_DEBUG
 static void packet_id_debug_print(int msglevel,
                                   const struct packet_id_rec *p,
                                   const struct packet_id_net *pin,
                                   const char *message,
                                   int value);
 
+#endif /* ENABLE_DEBUG */
+
 static inline void
 packet_id_debug(int msglevel,
                 const struct packet_id_rec *p,
index 3724443507c260a65af89a631d67e98b6ad0bffb..7347362564f1cb3f4568b9181ce8d7dc60f0a708 100644 (file)
@@ -394,6 +394,7 @@ reliable_send_purge(struct reliable *rel, const struct reliable_ack *ack)
     }
 }
 
+#ifdef ENABLE_DEBUG
 /* print the current sequence of active packet IDs */
 static const char *
 reliable_print_ids(const struct reliable *rel, struct gc_arena *gc)
@@ -412,6 +413,7 @@ reliable_print_ids(const struct reliable *rel, struct gc_arena *gc)
     }
     return BSTR(&out);
 }
+#endif /* ENABLE_DEBUG */
 
 /* true if at least one free buffer available */
 bool