From: Tanner Love <tannerlove.kernel@gmail•com>
To: netdev@vger•kernel.org
Cc: davem@davemloft•net, Tanner Love <tannerlove@google•com>,
Willem de Bruijn <willemb@google•com>
Subject: [PATCH net 1/4] selftests/net: rxtimestamp: fix clang issues for target arch PowerPC
Date: Mon, 27 Jul 2020 12:25:28 -0400 [thread overview]
Message-ID: <20200727162531.4089654-2-tannerlove.kernel@gmail.com> (raw)
In-Reply-To: <20200727162531.4089654-1-tannerlove.kernel@gmail.com>
From: Tanner Love <tannerlove@google•com>
The signedness of char is implementation-dependent. Some systems
(including PowerPC and ARM) use unsigned char. Clang 9 threw:
warning: result of comparison of constant -1 with expression of type \
'char' is always true [-Wtautological-constant-out-of-range-compare]
&arg_index)) != -1) {
Tested: make -C tools/testing/selftests TARGETS="net" run_tests
Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps")
Signed-off-by: Tanner Love <tannerlove@google•com>
Acked-by: Willem de Bruijn <willemb@google•com>
---
tools/testing/selftests/net/rxtimestamp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/rxtimestamp.c b/tools/testing/selftests/net/rxtimestamp.c
index 422e7761254d..bcb79ba1f214 100644
--- a/tools/testing/selftests/net/rxtimestamp.c
+++ b/tools/testing/selftests/net/rxtimestamp.c
@@ -329,8 +329,7 @@ int main(int argc, char **argv)
bool all_tests = true;
int arg_index = 0;
int failures = 0;
- int s, t;
- char opt;
+ int s, t, opt;
while ((opt = getopt_long(argc, argv, "", long_options,
&arg_index)) != -1) {
--
2.28.0.rc0.142.g3c755180ce-goog
next prev parent reply other threads:[~2020-07-27 16:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 16:25 [PATCH net 0/4] selftests/net: Fix clang warnings on powerpc Tanner Love
2020-07-27 16:25 ` Tanner Love [this message]
2020-07-27 16:25 ` [PATCH net 2/4] selftests/net: psock_fanout: fix clang issues for target arch PowerPC Tanner Love
2020-07-27 16:25 ` [PATCH net 3/4] selftests/net: so_txtime: " Tanner Love
2020-07-27 16:25 ` [PATCH net 4/4] selftests/net: tcp_mmap: fix clang warning " Tanner Love
2020-07-27 19:33 ` Eric Dumazet
2020-07-27 19:57 ` [PATCH net 0/4] selftests/net: Fix clang warnings on powerpc David Miller
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=20200727162531.4089654-2-tannerlove.kernel@gmail.com \
--to=tannerlove.kernel@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=tannerlove@google$(echo .)com \
--cc=willemb@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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