From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/fcntl: add new test for open file description locks
Date: Thu, 7 Apr 2016 13:43:21 +0300 [thread overview]
Message-ID: <570639C9.9040602@oracle.com> (raw)
In-Reply-To: <20160407082603.GA15786@rei.lan>
Hi,
On 04/07/2016 11:26 AM, Cyril Hrubis wrote:
> Hi!
>>>> + ++res[(int)buf[0]];
>>> ^
>>> Do we really need to cast it to int here?
>>
>> Otherwise gcc would complain "warning: array subscript has type ?char?"
> Hmm, perhaps the compiler tries to warn you that char may be signed or
> unsigned depending on a architecture and compiler implementation. Does
> the warning goes away if you declare the buf as a unsigned char?
Correct, it went away with unsigned char... more safe this way.
Thanks,
Alexey
>
prev parent reply other threads:[~2016-04-07 10:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 9:26 [LTP] [PATCH] syscalls/fcntl: add new test for open file description locks Alexey Kodanev
2016-04-06 15:07 ` Alexey Kodanev
2016-04-06 15:20 ` Cyril Hrubis
2016-04-06 16:07 ` Cyril Hrubis
2016-04-07 7:46 ` Alexey Kodanev
2016-04-07 8:26 ` Cyril Hrubis
2016-04-07 10:43 ` Alexey Kodanev [this message]
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=570639C9.9040602@oracle.com \
--to=alexey.kodanev@oracle.com \
--cc=ltp@lists.linux.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox