All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king at canonical.com>
To: devel@acpica.org
Subject: Re: [Devel] [PATCH] AcpiXtract: fix warning on int printed with %u specifier
Date: Thu, 02 Jul 2015 15:57:09 +0100	[thread overview]
Message-ID: <55955145.4000507@canonical.com> (raw)
In-Reply-To: 94F2FBAB4432B54E8AACC7DFDE6C92E37D309678@ORSMSX112.amr.corp.intel.com

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

On 02/07/15 14:23, Moore, Robert wrote:
> Got it, thanks.
> 
Thanks for applying it. However, the patch landed with the following
commit message:

commit 03f9b1938b163cc09306b3ba17c4bb701abf079d
Author: Robert Moore <Robert.Moore(a)intel.com>
Date:   Thu Jul 2 06:22:18 2015 -0700

    acpixtract: Replace an "int" with "unsigned int"

    The variable is used with %u printf, causing a warning via a
    static analysis tool. Reported by Colin Ian King.

This is a misrepresentation. I fixed it. Not just reported it. I know it
is a minor thing, but re-working the commit message in such a
disingenuous way as to take credit away from authors makes me want to no
longer contribute to ACPICA.  This has not been the first time credit on
fixes has been misrepresented "by accident" by re-working the commit
messages.


> 
>> -----Original Message-----
>> From: Devel [mailto:devel-bounces(a)acpica.org] On Behalf Of Colin King
>> Sent: Wednesday, July 01, 2015 12:02 AM
>> To: devel(a)acpica.org
>> Subject: [Devel] [PATCH] AcpiXtract: fix warning on int printed with %u
>> specifier
>>
>> From: Colin Ian King <colin.king(a)canonical.com>
>>
>> A signed integer is being printed using %u.  Since the integer is never
>> going to be negative, make it unsigned and this also cleans up the warning
>> found by static analysis:
>>
>> [source/tools/acpixtract/acpixtract.c:819]: (warning) %u in
>>   format string (no. 1) requires 'unsigned int' but the argument
>>   type is 'int'.
>>
>> Signed-off-by: Colin Ian King <colin.king(a)canonical.com>
>> ---
>>  source/tools/acpixtract/acpixtract.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/source/tools/acpixtract/acpixtract.c
>> b/source/tools/acpixtract/acpixtract.c
>> index fa2cb5a..7e961ff 100644
>> --- a/source/tools/acpixtract/acpixtract.c
>> +++ b/source/tools/acpixtract/acpixtract.c
>> @@ -738,7 +738,7 @@ AxListTables (
>>      FILE                    *InputFile;
>>      size_t                  HeaderSize;
>>      unsigned char           Header[48];
>> -    int                     TableCount = 0;
>> +    unsigned int            TableCount = 0;
>>      ACPI_TABLE_HEADER       *TableHeader = (ACPI_TABLE_HEADER *) (void *)
>> Header;
>>
>>
>> --
>> 2.1.4
>>
>> _______________________________________________
>> Devel mailing list
>> Devel(a)acpica.org
>> https://lists.acpica.org/mailman/listinfo/devel


             reply	other threads:[~2015-07-02 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 14:57 Colin Ian King [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-07-02 15:39 [Devel] [PATCH] AcpiXtract: fix warning on int printed with %u specifier Moore, Robert
2015-07-02 13:23 Moore, Robert
2015-07-01  7:01 Colin King

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=55955145.4000507@canonical.com \
    --to=devel@acpica.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.