All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] iptables trivial compile warning cleanup
Date: Fri, 30 Jun 2006 13:55:02 -0700	[thread overview]
Message-ID: <20060630205502.GA9243@linuxace.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

Cleanup a few compile warnings in latest snapshot:

extensions/libipt_dscp_helper.c:69: warning: 'dscp_to_name' defined but not used
extensions/libipt_sctp.c: In function 'print_chunks':
extensions/libipt_sctp.c:465: warning: value computed is not used
extensions/libipt_sctp.c:477: warning: value computed is not used

Resolves bug #457.

Phil



[-- Attachment #2: patch-compilewarn --]
[-- Type: text/plain, Size: 1016 bytes --]

diff -ru ipt-orig/extensions/libipt_dscp_helper.c ipt-new/extensions/libipt_dscp_helper.c
--- ipt-orig/extensions/libipt_dscp_helper.c	2002-08-26 06:09:40.000000000 -0700
+++ ipt-new/extensions/libipt_dscp_helper.c	2006-06-30 13:44:49.000000000 -0700
@@ -63,7 +63,7 @@
 }
 
 
-
+#if 0
 static const char *
 dscp_to_name(unsigned int dscp)
 {
@@ -78,5 +78,5 @@
 	exit_error(PARAMETER_PROBLEM,
 			"Invalid DSCP value `%d'\n", dscp);
 }
-
+#endif
 
diff -ru ipt-orig/extensions/libipt_sctp.c ipt-new/extensions/libipt_sctp.c
--- ipt-orig/extensions/libipt_sctp.c	2006-02-01 04:58:28.000000000 -0800
+++ ipt-new/extensions/libipt_sctp.c	2006-06-30 13:47:38.000000000 -0700
@@ -462,7 +462,8 @@
 	flag = 0;
 	for (i = 0; i < 256; i++) {
 		if (SCTP_CHUNKMAP_IS_SET(chunkmap, i)) {
-			flag && printf(",");
+			if (flag)
+				printf(",");
 			flag = 1;
 			print_chunk(i, numeric);
 			for (j = 0; j < flag_count; j++) {
@@ -474,7 +475,8 @@
 		}
 	}
 
-	flag && printf(" ");
+	if (flag)
+		printf(" ");
 out:
 	return;
 }

             reply	other threads:[~2006-06-30 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-30 20:55 Phil Oester [this message]
2006-07-03 17:53 ` [PATCH] iptables trivial compile warning cleanup Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060630205502.GA9243@linuxace.com \
    --to=kernel@linuxace.com \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.