lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Dec 2009 23:06:32 +0100 (CET)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	chavey@...gle.com
cc:	davem@...emloft.net, netdev@...r.kernel.org,
	netfilter-devel@...r.kernel.org, eric.dumazet@...il.com,
	akpm@...gle.com
Subject: Re: [PATCH] netfilter: Fix compiler warning.


On Donnerstag 2009-12-10 22:44, chavey@...gle.com wrote:

>Fix compiler warning "discards qualifiers from pointer target type",
>by allowing explicit discard of const qualifier thru type casting.
>The const_cast() macro is taken from a patch from Kaveh R. Ghazi

Uhm, I am not getting any warning on xt_time with either gcc-4.4.1
or gcc-4.5_20091126, so what case are we actually trying to fix?

>--- a/net/netfilter/xt_time.c
>+++ b/net/netfilter/xt_time.c
>@@ -170,7 +170,7 @@ time_mt(const struct sk_buff *skb, const struct xt_match_param *par)
> 	 * it arrived at the right moment before 13:00.
> 	 */
> 	if (skb->tstamp.tv64 == 0)
>-		__net_timestamp((struct sk_buff *)skb);
>+		__net_timestamp((struct sk_buff *)const_cast(skb));
> 
> 	stamp = ktime_to_ns(skb->tstamp);
> 	stamp = div_s64(stamp, NSEC_PER_SEC);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ