Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22f84cce authored by Tanner Love's avatar Tanner Love Committed by Greg Kroah-Hartman
Browse files

selftests/net: rxtimestamp: fix clang issues for target arch PowerPC



[ Upstream commit 955cbe91bcf782c09afe369c95a20f0a4b6dcc3c ]

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: 16e78122 ("selftests/net: Add a test to validate behavior of rx timestamps")
Signed-off-by: default avatarTanner Love <tannerlove@google.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 831c904a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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) {