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: <1374507539.4990.17.camel@edumazet-glaptop>
Date:	Mon, 22 Jul 2013 08:38:59 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Christoph Paasch <christoph.paasch@...ouvain.be>
Cc:	Stephen Hemminger <stephen@...workplumber.org>,
	netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 1/2] ss: Fix compiler errors of unused
 return-values

On Sat, 2013-07-20 at 21:58 +0200, Christoph Paasch wrote:
> Many errors when compiling with gcc 4.7.3 about unused return-values
> upon the calls to fgets and fscanf:
> 

> 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.
> 
> Signed-off-by: Christoph Paasch <christoph.paasch@...ouvain.be>
> ---
>  misc/ss.c | 30 +++++++++++++++++++++---------
>  1 file changed, 21 insertions(+), 9 deletions(-)
> 
> diff --git a/misc/ss.c b/misc/ss.c
> index c0369f1..0f71108 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -302,7 +302,7 @@ static void user_ent_hash_build(void)
>  
>  				snprintf(tmp, sizeof(tmp), "%s/%d/stat", root, pid);
>  				if ((fp = fopen(tmp, "r")) != NULL) {
> -					fscanf(fp, "%*d (%[^)])", process);
> +					if (fscanf(fp, "%*d (%[^)])", process) == EOF);

This is really ugly :(



--
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