All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 1/3] Suppress compiler warnings on write()
Date: Mon, 03 Dec 2012 08:14:46 -0800	[thread overview]
Message-ID: <50BCCFF6.8070608@linux.intel.com> (raw)
In-Reply-To: 1354547600-1743-1-git-send-email-namhyung@gmail.com

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

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.


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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 16:14 Arjan van de Ven [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:18 Namhyung Kim
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=50BCCFF6.8070608@linux.intel.com \
    --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.