gpst.c: In function 'gpst_connect':
gpst.c:723:46: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (13 chars into 12 available) [-Wunterminated-string-initialization]
723 | static const char start_tunnel[12] = "START_TUNNEL"; /* NOT zero-terminated */
| ^~~~~~~~~~~~~~
gpst.c: At top level:
gpst.c:1433:38: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (17 chars into 16 available) [-Wunterminated-string-initialization]
1433 | static char magic_ping_payload[16] = "monitor\x00\x00pan ha ";
| ^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
{
int ret;
struct oc_text_buf *reqbuf;
- static const char start_tunnel[12] = "START_TUNNEL"; /* NOT zero-terminated */
+ static const char start_tunnel[12] __attribute__((nonstring)) = "START_TUNNEL"; /* NOT NUL-terminated */
char buf[256];
/* We do NOT actually start the HTTPS tunnel if ESP is enabled and we received
return csum_finish(csum_partial(buf, nwords));
}
-static char magic_ping_payload[16] = "monitor\x00\x00pan ha ";
+static char magic_ping_payload[16] __attribute__((nonstring)) = "monitor\x00\x00pan ha "; /* NOT NUL-terminated */
int gpst_esp_send_probes(struct openconnect_info *vpninfo)
{