Skip to contentSkip to conversation

Trivial: kill __FUNCTION__ warnings in ip_nat_helper.c

PATCH New Matthias Juchem 1 participant 1 message Jun 19, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Trivial: kill __FUNCTION__ warnings in ip_nat_helper.c

Hi there.

The attached patch kills two warnings (produced by gcc 3.3):

ip_nat_helper.c:493: warning: concatenation of string literals with __FUNCTION__ is deprecated
ip_nat_helper.c:577: warning: concatenation of string literals with __FUNCTION__ is deprecated

Diff is against 2.4.21.

Regards,
Matthias

diff -urN linux-2.4.21-vanilla/net/ipv4/netfilter/ip_nat_helper.c linux-2.4.21/net/ipv4/netfilter/ip_nat_helper.c
--- linux-2.4.21-vanilla/net/ipv4/netfilter/ip_nat_helper.c 2003-06-19
11:53:43.000000000 +0200
+++ linux-2.4.21/net/ipv4/netfilter/ip_nat_helper.c 2003-06-19
12:37:26.000000000 +0200
@@ -488,9 +488,9 @@

                        const char *tmp = me->me->name;

                        if (strlen(tmp) + 6 > MODULE_MAX_NAMELEN) {

- printk(__FUNCTION__ ": unable to "
- "compute conntrack helper name "
- "from %s\n", tmp);
+ printk("%s: unable to compute conntrack "
+ "helper name from %s\n",

+                                      __FUNCTION__, tmp);
                                return -EBUSY;
                        }
                        tmp += 6;
@@ -573,7 +573,8 @@
                    && ct_helper->me) {
                        __MOD_DEC_USE_COUNT(ct_helper->me);
                } else

- printk(__FUNCTION__ ": unable to decrement usage
count"
- " of conntrack helper %s\n", me->me->name);
+ printk("%s: unable to decrement usage count of "
+ "conntrack helper %s\n",

+                              __FUNCTION__, me->me->name);
        }

}