Skip to content

Commit

Permalink
pedantic warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
faragon committed Feb 13, 2019
1 parent 8eeff75 commit f3e5e95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/sbitset.c
Expand Up @@ -9,11 +9,10 @@

#include "sbitset.h"

srt_bitset *sb_alloc_aux(void *raw, size_t n, size_t nb)
srt_bitset *sb_alloc_aux(srt_bitset *b)
{
srt_bitset *bs = (srt_bitset *)raw;
sb_clear(bs);
return bs;
sb_clear(b);
return b;
}

void sb_clear(srt_bitset *b)
Expand Down
6 changes: 3 additions & 3 deletions src/sbitset.h
Expand Up @@ -44,13 +44,13 @@ typedef srt_vector srt_bitset; /* Opaque structure (accessors are provided) */

#define SB_BITS2BYTES(n) (1 + n / 8)
#define sb_alloc(n) \
sb_alloc_aux(sv_alloc(1, SB_BITS2BYTES(n), NULL), n, SB_BITS2BYTES(n))
sb_alloc_aux((srt_bitset *)sv_alloc(1, SB_BITS2BYTES(n), NULL))
#define sb_alloca(n) \
sb_alloc_aux(sv_alloca(1, SB_BITS2BYTES(n), NULL), n, SB_BITS2BYTES(n))
sb_alloc_aux((srt_bitset *)sv_alloca(1, SB_BITS2BYTES(n), NULL))
#define sb_dup(b) sv_dup(b)
#define sb_free sv_free

srt_bitset *sb_alloc_aux(void *raw, size_t n, size_t nb);
srt_bitset *sb_alloc_aux(srt_bitset *b);

/*
#API: |Allocate bitset (stack)|space preallocated to store n elements|bitset|O(n)|1;2|
Expand Down

0 comments on commit f3e5e95

Please sign in to comment.