All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 1/3] Suppress compiler warnings on write()
Date: Tue, 04 Dec 2012 01:18:14 +0900	[thread overview]
Message-ID: <1354551494.1506.1.camel@leonhard> (raw)
In-Reply-To: 50BCCFF6.8070608@linux.intel.com

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

Hi Arjan,

2012-12-03 (월), 08:14 -0800, Arjan van de Ven:
> On 12/3/2012 7:13 AM, Namhyung Kim wrote:
> > -		write(fd, buffer, 64*1024);
> > +		if (write(fd, buffer, 64*1024))
> > +			/* make gcc silent */;
> >   		fdatasync(fd);
> 
> I'm sorry, but no.
> This is waaaaaaaaaaay worse than leaving the compiler warning.
> The compiler warning is real, and is a reminder that we need to improve the code
> "just make it shut up" patches are a really bad idea, and this is the perfect example of that.
> 

So how can we improve the code then?

-- 
Regards,
Namhyung Kim



             reply	other threads:[~2012-12-03 16:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 16:18 Namhyung Kim [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-03 16:25 [Powertop] [PATCH 1/3] Suppress compiler warnings on write() Ferron, Chris E
2012-12-03 16:14 Arjan van de Ven
2012-12-03 15:13 Namhyung Kim

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=1354551494.1506.1.camel@leonhard \
    --to=powertop@lists.01.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.