mirror of https://github.com/F-Stack/f-stack.git
Fix ff tools build error with gcc-13.2.0.
This commit is contained in:
parent
3fbb555e0d
commit
fc0f76b7b5
|
@ -5,7 +5,7 @@
|
|||
/*-
|
||||
* Copyright (c) 1996-1999 Whistle Communications, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Subject to the following obligations and disclaimer of warranty, use and
|
||||
* redistribution of this software, in source or object code forms, with or
|
||||
* without modifications are expressly permitted by Whistle Communications;
|
||||
|
@ -16,7 +16,7 @@
|
|||
* Communications, Inc. trademarks, including the mark "WHISTLE
|
||||
* COMMUNICATIONS" on advertising, endorsements, or otherwise except as
|
||||
* such appears in the above copyright notice or in the software.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
|
||||
* REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
|
||||
|
@ -62,7 +62,7 @@ enum {
|
|||
struct sockaddr_ng {
|
||||
unsigned char sg_len; /* total length */
|
||||
sa_family_t sg_family; /* address family */
|
||||
char sg_data[14]; /* actually longer; address value */
|
||||
char sg_data[32]; /* see NG_NODESIZ in ng_message.h */
|
||||
};
|
||||
|
||||
#endif /* _NETGRAPH_NG_SOCKET_H_ */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/*-
|
||||
* Copyright (c) 1996-1999 Whistle Communications, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Subject to the following obligations and disclaimer of warranty, use and
|
||||
* redistribution of this software, in source or object code forms, with or
|
||||
* without modifications are expressly permitted by Whistle Communications;
|
||||
|
@ -16,7 +16,7 @@
|
|||
* Communications, Inc. trademarks, including the mark "WHISTLE
|
||||
* COMMUNICATIONS" on advertising, endorsements, or otherwise except as
|
||||
* such appears in the above copyright notice or in the software.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
|
||||
* REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
|
||||
|
@ -62,7 +62,7 @@ enum {
|
|||
struct sockaddr_ng {
|
||||
unsigned char sg_len; /* total length */
|
||||
sa_family_t sg_family; /* address family */
|
||||
char sg_data[14]; /* actually longer; address value */
|
||||
char sg_data[32]; /* see NG_NODESIZ in ng_message.h */
|
||||
};
|
||||
|
||||
#endif /* _NETGRAPH_NG_SOCKET_H_ */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (c) 1996-1999 Whistle Communications, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Subject to the following obligations and disclaimer of warranty, use and
|
||||
* redistribution of this software, in source or object code forms, with or
|
||||
* without modifications are expressly permitted by Whistle Communications;
|
||||
|
@ -14,7 +14,7 @@
|
|||
* Communications, Inc. trademarks, including the mark "WHISTLE
|
||||
* COMMUNICATIONS" on advertising, endorsements, or otherwise except as
|
||||
* such appears in the above copyright notice or in the software.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
|
||||
* REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
|
||||
|
@ -217,7 +217,10 @@ NgDeliverMsg(int cs, const char *path,
|
|||
/* Prepare socket address */
|
||||
sg->sg_family = AF_NETGRAPH;
|
||||
/* XXX handle overflow */
|
||||
strlcpy(sg->sg_data, path, NG_PATHSIZ);
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
strncpy(sg->sg_data, path, NG_PATHSIZ);
|
||||
#pragma GCC diagnostic pop
|
||||
sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD;
|
||||
|
||||
/* Debugging */
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
*
|
||||
* Copyright (c) 2002 Archie L. Cobbs
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Subject to the following obligations and disclaimer of warranty, use and
|
||||
* redistribution of this software, in source or object code forms, with or
|
||||
* without modifications are expressly permitted by Archie L. Cobbs;
|
||||
* provided, however, that:
|
||||
* 1. Any and all reproductions of the source or object code must include the
|
||||
* copyright notice above and the following disclaimer of warranties
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS BEING PROVIDED BY ARCHIE L. COBBS AS IS", AND TO
|
||||
* THE MAXIMUM EXTENT PERMITTED BY LAW, ARCHIE L. COBBS MAKES NO
|
||||
* REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
|
||||
|
@ -108,7 +108,10 @@ WriteCmd(int ac, char **av)
|
|||
/* Send data */
|
||||
sag->sg_len = 3 + strlen(hook);
|
||||
sag->sg_family = AF_NETGRAPH;
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
strlcpy(sag->sg_data, hook, sizeof(sagbuf) - 2);
|
||||
#pragma GCC diagnostic pop
|
||||
if (sendto(dsock, buf, len,
|
||||
0, (struct sockaddr *)sag, sag->sg_len) == -1) {
|
||||
warn("writing to hook \"%s\"", hook);
|
||||
|
|
Loading…
Reference in New Issue