Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new compiler warnings #2118

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/OVAL/results/oval_cmp_ip_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static inline void ipv6addr_mask(struct in6_addr *addr, int prefix_len)
uint8_t mask = (~0u) << (8u - (prefix_len % 8));

/* First n (prefix_len/8 - 1) bytes are left untouched. */
for (int i = prefix_len/8; i < 128/8; i++)
for (unsigned int i = prefix_len/8; i < 128/8; i++)
{
/* The (n+1) byte is masked according to the prefix_len */
addr->s6_addr[i] &= mask;
Expand Down
2 changes: 1 addition & 1 deletion src/common/_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#define oscap_setxmlerr(error) __oscap_setxmlerr (__FILE__, __LINE__, __PRETTY_FUNCTION__, error)

void __oscap_setxmlerr(const char *file, uint32_t line, const char *func, xmlErrorPtr error);
void __oscap_setxmlerr(const char *file, uint32_t line, const char *func, const xmlError *error);

struct oscap_err_t {
oscap_errfamily_t family;
Expand Down
2 changes: 1 addition & 1 deletion src/common/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static inline void _push_err(struct oscap_err_t *err)
(void)err_queue_push(q, err);
}

void __oscap_setxmlerr(const char *file, uint32_t line, const char *func, xmlErrorPtr error)
void __oscap_setxmlerr(const char *file, uint32_t line, const char *func, const xmlError *error)
{

if (error == NULL)
Expand Down
4 changes: 2 additions & 2 deletions src/source/bz2.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ static void bz2_mem_free(struct bz2_mem *bzmem)

static struct bz2_mem *bz2_mem_open(const char *buffer, size_t size)
{
struct bz2_mem *b = calloc(sizeof(struct bz2_mem), 1);
b->stream = calloc(sizeof(bz_stream), 1);
struct bz2_mem *b = calloc(1, sizeof(struct bz2_mem));
b->stream = calloc(1, sizeof(bz_stream));
// next_in should point at the compressed data
b->stream->next_in = (char *) buffer;
// and avail_in should indicate how many bytes the library may read
Expand Down
Loading