From c5a2851e96afd3e06785551ab90eb1157407e6cb Mon Sep 17 00:00:00 2001 From: gandalf Date: Wed, 26 May 2004 16:04:48 +0000 Subject: Get rid of some warnings when compiling 64bit. --- extensions/libip6t_LOG.c | 2 +- extensions/libipt_LOG.c | 2 +- extensions/libipt_ULOG.c | 10 +++++----- extensions/libipt_owner.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'extensions') diff --git a/extensions/libip6t_LOG.c b/extensions/libip6t_LOG.c index 997e439..74655af 100644 --- a/extensions/libip6t_LOG.c +++ b/extensions/libip6t_LOG.c @@ -134,7 +134,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, if (strlen(optarg) > sizeof(loginfo->prefix) - 1) exit_error(PARAMETER_PROBLEM, "Maximum prefix length %u for --log-prefix", - sizeof(loginfo->prefix) - 1); + (unsigned int)sizeof(loginfo->prefix) - 1); strcpy(loginfo->prefix, optarg); *flags |= IP6T_LOG_OPT_PREFIX; diff --git a/extensions/libipt_LOG.c b/extensions/libipt_LOG.c index f8c8e4b..37185e7 100644 --- a/extensions/libipt_LOG.c +++ b/extensions/libipt_LOG.c @@ -134,7 +134,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, if (strlen(optarg) > sizeof(loginfo->prefix) - 1) exit_error(PARAMETER_PROBLEM, "Maximum prefix length %u for --log-prefix", - sizeof(loginfo->prefix) - 1); + (unsigned int)sizeof(loginfo->prefix) - 1); strcpy(loginfo->prefix, optarg); *flags |= IPT_LOG_OPT_PREFIX; diff --git a/extensions/libipt_ULOG.c b/extensions/libipt_ULOG.c index 5371911..5ced462 100644 --- a/extensions/libipt_ULOG.c +++ b/extensions/libipt_ULOG.c @@ -110,7 +110,7 @@ static int parse(int c, char **argv, int invert, unsigned int *flags, if (strlen(optarg) > sizeof(loginfo->prefix) - 1) exit_error(PARAMETER_PROBLEM, "Maximum prefix length %u for --ulog-prefix", - sizeof(loginfo->prefix) - 1); + (unsigned int)sizeof(loginfo->prefix) - 1); strcpy(loginfo->prefix, optarg); *flags |= IPT_LOG_OPT_PREFIX; @@ -177,10 +177,10 @@ static void save(const struct ipt_ip *ip, printf("--ulog-qthreshold %llu ", loginfo->qthreshold); #else if (loginfo->copy_range) - printf("--ulog-cprange %d ", loginfo->copy_range); + printf("--ulog-cprange %u ", (unsigned int)loginfo->copy_range); if (loginfo->qthreshold != ULOG_DEFAULT_QTHRESHOLD) - printf("--ulog-qthreshold %d ", loginfo->qthreshold); + printf("--ulog-qthreshold %u ", (unsigned int)loginfo->qthreshold); #endif } @@ -196,7 +196,7 @@ print(const struct ipt_ip *ip, #ifdef KERNEL_64_USERSPACE_32 printf("copy_range %llu nlgroup ", loginfo->copy_range); #else - printf("copy_range %d nlgroup ", loginfo->copy_range); + printf("copy_range %u nlgroup ", (unsigned int)loginfo->copy_range); #endif print_groups(loginfo->nl_group); if (strcmp(loginfo->prefix, "") != 0) @@ -204,7 +204,7 @@ print(const struct ipt_ip *ip, #ifdef KERNEL_64_USERSPACE_32 printf("queue_threshold %llu ", loginfo->qthreshold); #else - printf("queue_threshold %d ", loginfo->qthreshold); + printf("queue_threshold %u ", (unsigned int)loginfo->qthreshold); #endif } diff --git a/extensions/libipt_owner.c b/extensions/libipt_owner.c index 9c92ab2..9d112cf 100644 --- a/extensions/libipt_owner.c +++ b/extensions/libipt_owner.c @@ -125,7 +125,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, case '5': check_inverse(optarg, &invert, &optind, 0); if(strlen(optarg) > sizeof(ownerinfo->comm)) - exit_error(PARAMETER_PROBLEM, "OWNER CMD `%s' too long, max %d characters", optarg, sizeof(ownerinfo->comm)); + exit_error(PARAMETER_PROBLEM, "OWNER CMD `%s' too long, max %u characters", optarg, (unsigned int)sizeof(ownerinfo->comm)); strncpy(ownerinfo->comm, optarg, sizeof(ownerinfo->comm)); ownerinfo->comm[sizeof(ownerinfo->comm)-1] = '\0'; -- cgit v1.2.3