We already have an assert ensuring the value is sane,
so just add the cast.
Change-Id: I4a5c46f321709c83a4a921366630fb8e02834701
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1260
Message-Id: <20251008170149.10301-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/59244106/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
| ... | ... |
@@ -72,11 +72,6 @@ lzo_compress(struct buffer *buf, struct buffer work, struct compress_context *co |
| 72 | 72 |
*header = NO_COMPRESS_BYTE; |
| 73 | 73 |
} |
| 74 | 74 |
|
| 75 |
-#if defined(__GNUC__) || defined(__clang__) |
|
| 76 |
-#pragma GCC diagnostic push |
|
| 77 |
-#pragma GCC diagnostic ignored "-Wconversion" |
|
| 78 |
-#endif |
|
| 79 |
- |
|
| 80 | 75 |
static void |
| 81 | 76 |
lzo_decompress(struct buffer *buf, struct buffer work, struct compress_context *compctx, |
| 82 | 77 |
const struct frame *frame) |
| ... | ... |
@@ -107,7 +102,7 @@ lzo_decompress(struct buffer *buf, struct buffer work, struct compress_context * |
| 107 | 107 |
} |
| 108 | 108 |
|
| 109 | 109 |
ASSERT(buf_safe(&work, zlen)); |
| 110 |
- work.len = zlen; |
|
| 110 |
+ work.len = (int)zlen; |
|
| 111 | 111 |
|
| 112 | 112 |
dmsg(D_COMP, "LZO decompress %d -> %d", buf->len, work.len); |
| 113 | 113 |
compctx->pre_decompress += buf->len; |
| ... | ... |
@@ -126,10 +121,6 @@ lzo_decompress(struct buffer *buf, struct buffer work, struct compress_context * |
| 126 | 126 |
} |
| 127 | 127 |
} |
| 128 | 128 |
|
| 129 |
-#if defined(__GNUC__) || defined(__clang__) |
|
| 130 |
-#pragma GCC diagnostic pop |
|
| 131 |
-#endif |
|
| 132 |
- |
|
| 133 | 129 |
const struct compress_alg lzo_alg = { "lzo", lzo_compress_init, lzo_compress_uninit, lzo_compress,
|
| 134 | 130 |
lzo_decompress }; |
| 135 | 131 |
#endif /* ENABLE_LZO */ |