Address a couple errors identified by ORCA/C 2.2.0 B2.

One of these concerned socket-related structures that aren't really used in hush. The other was a reliance on a GCC-specific feature (arithmetic on void pointers); this code is actually used in hush, although I'm not sure if the error was causing any real problems.
This commit is contained in:
Stephen Heumann 2017-12-31 16:07:51 -06:00
parent fa5c5f6f53
commit 99224d3946
2 changed files with 1 additions and 2 deletions

View File

@ -556,7 +556,6 @@ typedef struct len_and_sockaddr {
socklen_t len; socklen_t len;
union { union {
struct sockaddr sa; struct sockaddr sa;
struct sockaddr_in sin;
#if ENABLE_FEATURE_IPV6 #if ENABLE_FEATURE_IPV6
struct sockaddr_in6 sin6; struct sockaddr_in6 sin6;
#endif #endif

View File

@ -527,7 +527,7 @@ extern char *stpcpy(char *p, const char *to_add) FAST_FUNC;
#define mempcpy bb__mempcpy #define mempcpy bb__mempcpy
static ALWAYS_INLINE void *mempcpy(void *dest, const void *src, size_t len) static ALWAYS_INLINE void *mempcpy(void *dest, const void *src, size_t len)
{ {
return memcpy(dest, src, len) + len; return (char *)memcpy(dest, src, len) + len;
} }
#endif #endif