Skip to content

Commit 5f2361f

Browse files
tannerlovegregkh
authored andcommitted
selftests/net: rxtimestamp: fix clang issues for target arch PowerPC
[ Upstream commit 955cbe9 ] 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: 16e7812 ("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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 49fe954 commit 5f2361f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎tools/testing/selftests/net/rxtimestamp.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,7 @@ int main(int argc, char **argv)
329329
bool all_tests = true;
330330
int arg_index = 0;
331331
int failures = 0;
332-
int s, t;
333-
char opt;
332+
int s, t, opt;
334333

335334
while ((opt = getopt_long(argc, argv, "", long_options,
336335
&arg_index)) != -1) {

0 commit comments

Comments
 (0)