netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kirjanov <kirjanov@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Christoph Paasch <christoph.paasch@uclouvain.be>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 1/2] ss: Fix compiler errors of unused return-values
Date: Mon, 22 Jul 2013 19:06:11 +0400	[thread overview]
Message-ID: <CAHj3AVnrAvCZvzY00qsQodwyXSLF28bPWFJhRTnd5Ny=kZHyZA@mail.gmail.com> (raw)
In-Reply-To: <20130722075410.78532ad4@nehalam.linuxnetplumber.net>

Do we need the -Werror at all? I've found a similar discussion
regarding building wil6210 driver with the same issue

On 7/22/13, Stephen Hemminger <stephen@networkplumber.org> wrote:
> On Sat, 20 Jul 2013 21:58:17 +0200
> Christoph Paasch <christoph.paasch@uclouvain.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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Regards,
Denis

  reply	other threads:[~2013-07-22 15:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-20 19:58 [PATCH iproute2 0/2] Fix compiler-errors with gcc 4.7.3 Christoph Paasch
2013-07-20 19:58 ` [PATCH iproute2 1/2] ss: Fix compiler errors of unused return-values Christoph Paasch
2013-07-22 14:54   ` Stephen Hemminger
2013-07-22 15:06     ` Denis Kirjanov [this message]
2013-07-22 15:35       ` Stephen Hemminger
2013-07-22 15:14     ` Christoph Paasch
2013-07-22 15:38   ` Eric Dumazet
2013-07-22 17:26     ` Ben Hutchings
2013-07-20 19:58 ` [PATCH iproute2 2/2] lnstat: " Christoph Paasch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHj3AVnrAvCZvzY00qsQodwyXSLF28bPWFJhRTnd5Ny=kZHyZA@mail.gmail.com' \
    --to=kirjanov@gmail.com \
    --cc=christoph.paasch@uclouvain.be \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --subject='Re: [PATCH iproute2 1/2] ss: Fix compiler errors of unused return-values' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).