Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ipsec-tools/src/libipsec fix -Wdiscarded-qualifiers
details: https://anonhg.NetBSD.org/src/rev/2ecf0ba8b62f
branches: trunk
changeset: 319375:2ecf0ba8b62f
user: maxv <maxv%NetBSD.org@localhost>
date: Mon May 28 19:36:42 2018 +0000
description:
fix -Wdiscarded-qualifiers
diffstat:
crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c | 26 ++++++++++----------
crypto/dist/ipsec-tools/src/libipsec/policy_parse.y | 6 ++--
2 files changed, 16 insertions(+), 16 deletions(-)
diffs (118 lines):
diff -r 96c82f5bfe60 -r 2ecf0ba8b62f crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c
--- a/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c Mon May 28 19:22:40 2018 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c Mon May 28 19:36:42 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pfkey_dump.c,v 1.22 2018/05/28 19:22:40 maxv Exp $ */
+/* $NetBSD: pfkey_dump.c,v 1.23 2018/05/28 19:36:42 maxv Exp $ */
/* $KAME: pfkey_dump.c,v 1.45 2003/09/08 10:14:56 itojun Exp $ */
@@ -105,12 +105,12 @@
printf("%u ", (num)); \
} while (/*CONSTCOND*/0)
-static char *str_ipaddr __P((struct sockaddr *));
-static char *str_ipport __P((struct sockaddr *));
-static char *str_prefport __P((u_int, u_int, u_int, u_int));
+static const char *str_ipaddr __P((struct sockaddr *));
+static const char *str_ipport __P((struct sockaddr *));
+static const char *str_prefport __P((u_int, u_int, u_int, u_int));
static void str_upperspec __P((u_int, u_int, u_int));
static char *str_time __P((time_t));
-static void str_lifetime_byte __P((struct sadb_lifetime *, char *));
+static void str_lifetime_byte __P((struct sadb_lifetime *, const char *));
static void pfkey_sadump1(struct sadb_msg *, int);
static void pfkey_spdump1(struct sadb_msg *, int);
@@ -122,7 +122,7 @@
/*
* Must to be re-written about following strings.
*/
-static char *str_satype[] = {
+static const char *str_satype[] = {
"unspec",
"unknown",
"ah",
@@ -137,13 +137,13 @@
"tcp",
};
-static char *str_mode[] = {
+static const char *str_mode[] = {
"any",
"transport",
"tunnel",
};
-static char *str_state[] = {
+static const char *str_state[] = {
"larval",
"mature",
"dying",
@@ -661,7 +661,7 @@
/*
* set "ipaddress" to buffer.
*/
-static char *
+static const char *
str_ipaddr(struct sockaddr *sa)
{
static char buf[NI_MAXHOST];
@@ -679,7 +679,7 @@
/*
* set "port" to buffer.
*/
-static char *
+static const char *
str_ipport(struct sockaddr *sa)
{
static char buf[NI_MAXHOST];
@@ -698,7 +698,7 @@
/*
* set "/prefix[port number]" to buffer.
*/
-static char *
+static const char *
str_prefport(u_int family, u_int pref, u_int port, u_int ulp)
{
static char buf[128];
@@ -793,10 +793,10 @@
}
static void
-str_lifetime_byte(struct sadb_lifetime *x, char *str)
+str_lifetime_byte(struct sadb_lifetime *x, const char *str)
{
double y;
- char *unit;
+ const char *unit;
int w;
if (x == NULL) {
diff -r 96c82f5bfe60 -r 2ecf0ba8b62f crypto/dist/ipsec-tools/src/libipsec/policy_parse.y
--- a/crypto/dist/ipsec-tools/src/libipsec/policy_parse.y Mon May 28 19:22:40 2018 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/policy_parse.y Mon May 28 19:36:42 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: policy_parse.y,v 1.12 2018/05/28 19:22:40 maxv Exp $ */
+/* $NetBSD: policy_parse.y,v 1.13 2018/05/28 19:36:42 maxv Exp $ */
/* $KAME: policy_parse.y,v 1.21 2003/12/12 08:01:26 itojun Exp $ */
@@ -107,7 +107,7 @@
static struct sockaddr *p_dst = NULL;
struct _val;
-extern void yyerror __P((char *msg));
+extern void yyerror __P((const char *msg));
static struct sockaddr *parse_sockaddr __P((struct _val *addrbuf,
struct _val *portbuf));
static int rule_check __P((void));
@@ -362,7 +362,7 @@
%%
void
-yyerror(char *msg)
+yyerror(const char *msg)
{
fprintf(stderr, "libipsec: %s while parsing \"%s\"\n",
msg, __libipsectext);
Home |
Main Index |
Thread Index |
Old Index