Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Jun 17, 2015
1 parent dbe94d1 commit d5e67c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/flisp/flisp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2248,7 +2248,7 @@ value_t fl_map1(value_t *args, u_int32_t nargs)
if (!iscons(args[1])) return NIL;
value_t v;
uint32_t first, last, argSP = args-Stack;
assert(argSP >= 0 && argSP < N_STACK);
assert(args >= Stack && argSP < N_STACK);
if (nargs == 2) {
if (SP+4 > N_STACK) grow_stack();
PUSH(Stack[argSP]);
Expand Down
4 changes: 2 additions & 2 deletions test/ccalltest.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ testUcharX(unsigned char x) {

#define xstr(s) str(s)
#define str(s) #s
volatile int (*fptr)(unsigned char x);
int (*volatile fptr)(unsigned char x);
volatile int a;
volatile int b;

Expand Down Expand Up @@ -348,7 +348,7 @@ int main() {
fprintf(stderr,"all of the following should be 1 except xs[259] = 0\n");
a = 3;
b = 259;
fptr = (volatile int (*)(unsigned char x))&testUcharX;
fptr = (int (*)(unsigned char x))&testUcharX;
if ((((size_t)fptr)&((size_t)1)) == 1) fptr = NULL;
fprintf(stderr,"compiled with: '%s'\nxs[3] = %d\nxs[259] = %d\ntestUcharX(3) = %d\ntestUcharX(%d) = %d\nfptr(3) = %d\nfptr(259) = %d\n",
xstr(CC), xs[a], xs[b], testUcharX(a), b, testUcharX((unsigned char)b), fptr(a), fptr(b));
Expand Down

0 comments on commit d5e67c2

Please sign in to comment.