From: Ilya Ponetayev Date: Fri, 17 Jun 2022 04:13:26 +0000 (+0300) Subject: fix compilation issues with small and w/o debug X-Git-Tag: v2.6_beta1~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c815699ba616151e6bc5074cd150f3ebf053d4a;p=thirdparty%2Fopenvpn.git fix compilation issues with small and w/o debug Acked-by: Frank Lichtenheld 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 --- diff --git a/src/openvpn/init.c b/src/openvpn/init.c index b0c62a859..f06afc298 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -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); diff --git a/src/openvpn/mtcp.c b/src/openvpn/mtcp.c index b725bebbd..b3c153fed 100644 --- a/src/openvpn/mtcp.c +++ b/src/openvpn/mtcp.c @@ -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) diff --git a/src/openvpn/packet_id.c b/src/openvpn/packet_id.c index e357909d7..1872bd13f 100644 --- a/src/openvpn/packet_id.c +++ b/src/openvpn/packet_id.c @@ -53,12 +53,15 @@ #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, diff --git a/src/openvpn/reliable.c b/src/openvpn/reliable.c index 372444350..734736256 100644 --- a/src/openvpn/reliable.c +++ b/src/openvpn/reliable.c @@ -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