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 GCC compiler warnings #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 7 additions & 3 deletions src/sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
# define BITSCAN_WIN
#endif

#ifndef __has_builtin
# define __has_builtin(...) 0
#endif

// internal representation of a string
typedef struct {
uint8_t *bytes;
Expand Down Expand Up @@ -9228,7 +9232,7 @@ static inline int bmp_alloc(uint64_t *bmp, int count){
unsigned long pos;
_BitScanForward64(&pos, ~*bmp);
#else
# error Don't know how to implement bmp_alloc
# error "Don't know how to implement bmp_alloc"
#endif

*bmp |= UINT64_C(1) << pos;
Expand Down Expand Up @@ -11274,7 +11278,7 @@ static sink_val unop_int_not(context ctx, sink_val a){
}

static sink_val unop_int_clz(context ctx, sink_val a){
#if defined(__has_builtin) && __has_builtin(__builtin_clz)
#if __has_builtin(__builtin_clz)
int32_t i = toint(a);
if (i == 0)
return sink_num(32);
Expand All @@ -11289,7 +11293,7 @@ static sink_val unop_int_clz(context ctx, sink_val a){
_BitScanReverse(&pos, i);
return sink_num(31 - pos);
#else
# error Don't know how to implement bmp_alloc
# error "Don't know how to implement bmp_alloc"
#endif
}

Expand Down