Skip to content

Commit 955cbe9

Browse files
tannerlovedavem330
authored andcommitted
selftests/net: rxtimestamp: fix clang issues for target arch PowerPC
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 <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5fd8220 commit 955cbe9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)