Commit 25ee7327d04bc3ff41a7a5ac42d74226f8d60ac6
Committed by
David S. Miller
1 parent
de5df63228
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
net: bpf: fix compiler warnings in test_bpf
old gcc 4.2 used by avr32 architecture produces warnings: lib/test_bpf.c:1741: warning: integer constant is too large for 'long' type lib/test_bpf.c:1741: warning: integer constant is too large for 'long' type lib/test_bpf.c: In function '__run_one': lib/test_bpf.c:1897: warning: 'ret' may be used uninitialized in this function silence these warnings. Fixes: 02ab695bb37e ("net: filter: add "load 64-bit immediate" eBPF instruction") Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
lib/test_bpf.c
... | ... | @@ -1738,7 +1738,7 @@ |
1738 | 1738 | { |
1739 | 1739 | "load 64-bit immediate", |
1740 | 1740 | .u.insns_int = { |
1741 | - BPF_LD_IMM64(R1, 0x567800001234L), | |
1741 | + BPF_LD_IMM64(R1, 0x567800001234LL), | |
1742 | 1742 | BPF_MOV64_REG(R2, R1), |
1743 | 1743 | BPF_MOV64_REG(R3, R2), |
1744 | 1744 | BPF_ALU64_IMM(BPF_RSH, R2, 32), |
... | ... | @@ -1894,7 +1894,7 @@ |
1894 | 1894 | int runs, u64 *duration) |
1895 | 1895 | { |
1896 | 1896 | u64 start, finish; |
1897 | - int ret, i; | |
1897 | + int ret = 0, i; | |
1898 | 1898 | |
1899 | 1899 | start = ktime_to_us(ktime_get()); |
1900 | 1900 |