gcc-9.x warning fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2020-10-01 03:07:22 +02:00
parent aaa0709e7b
commit 4a0eb0370c
9 changed files with 15 additions and 12 deletions

View File

@@ -6,8 +6,10 @@
#include "libbb.h"
uint16_t FAST_FUNC inet_cksum(uint16_t *addr, int nleft)
uint16_t FAST_FUNC inet_cksum(const void *ptr, int nleft)
{
const uint16_t *addr = ptr;
/*
* Our algorithm is simple, using a 32 bit accumulator,
* we add sequential 16 bit words to it, and at the end, fold