Skip to contentSkip to conversation

Fix warnings when debug mode is on

PATCH In review Pablo Neira 2 participants 3 messages Aug 1, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/7 Fix warnings when debug mode is on

Fix some warnings when DEBUGP is set.

net/ipv4/netfilter/ip_conntrack_netlink.c +3 -3
Index: netfilter-2.6.14/net/ipv4/netfilter/ip_conntrack_netlink.c
===================================================================
@@ -436,7 +436,7 @@
 	struct list_head *i;
 	u_int32_t *id = (u_int32_t *) &cb->args[1];
 
-	DEBUGP("entered %s, last bucket=%u id=%u\n", __FUNCTION__, 
+	DEBUGP("entered %s, last bucket=%lu id=%u\n", __FUNCTION__, 
 			cb->args[0], *id);
 
 	write_lock_bh(&ip_conntrack_lock);
@@ -1207,7 +1207,7 @@
 	struct list_head *i;
 	u_int32_t *id = (u_int32_t *) &cb->args[0];
 
-	DEBUGP("entered %s, last id=%llu\n", __FUNCTION__, *id);
+	DEBUGP("entered %s, last id=%u\n", __FUNCTION__, *id);
 
 	read_lock_bh(&ip_conntrack_lock);
 	list_for_each(i, &ip_conntrack_expect_list) {
@@ -1224,7 +1224,7 @@
 out:	
 	read_unlock_bh(&ip_conntrack_lock);
 
-	DEBUGP("leaving, last id=%llu\n", *id);
+	DEBUGP("leaving, last id=%u\n", *id);
 
 	return skb->len;
 }
#1 lore raw
Quoted 1 line · Pablo Neira

Fix some warnings when DEBUGP is set.

Thanks, looks sane to me, I'll apply it

Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#2 lore raw
In reply to Pablo Neira
Quoted 1 line · Pablo Neira

Fix some warnings when DEBUGP is set.

no, this actually is not sane. There are some pointer/... specific format strings. You compile for i386, therefore you get warnings. I compile with x86_64 by default, and I don't get warnings.

Please read some C99 reference and submit patches with the correct format string modifier (I don't remember them off my head) and submit an upated patch.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie