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]
Message-ID: <20130722075410.78532ad4@nehalam.linuxnetplumber.net>
Date:	Mon, 22 Jul 2013 07:54:10 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Christoph Paasch <christoph.paasch@...ouvain.be>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 1/2] ss: Fix compiler errors of unused
 return-values

On Sat, 20 Jul 2013 21:58:17 +0200
Christoph Paasch <christoph.paasch@...ouvain.be> wrote:

> Many errors when compiling with gcc 4.7.3 about unused return-values
> upon the calls to fgets and fscanf:
> 
> ss.c: In function ‘user_ent_hash_build’:
> ss.c:305:12: error: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Werror=unused-result]
> ss.c: In function ‘get_slabstat’:
> ss.c:387:7: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
> ss.c: In function ‘init_service_resolver’:
> ss.c:511:8: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
> ss.c: In function ‘run_ssfilter’:
> ss.c:728:11: error: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Werror=unused-result]
> ss.c: In function ‘is_ephemeral’:
> ss.c:550:10: error: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Werror=unused-result]
> ss.c: In function ‘netlink_show’:
> ss.c:2836:7: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
> ss.c: In function ‘packet_show’:
> ss.c:2630:7: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
> ss.c: In function ‘unix_show’:
> ss.c:2364:7: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Werror=unused-result]
> cc1: all warnings being treated as errors
> make[1]: *** [ss.o] Error 1
> make[1]: Leaving directory `/home/christoph/workspace/linux/iproute2/misc'
> make: *** [all] Error 2
> 
> For the calls to fscanf we can't really do anything about it, and just
> do an empty if-statement to make the compiler happy.
> 
>

I would prefer an error message rather than silently exiting.
--
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