Silences gcc warning

warning: expression does not compute the number of elements in this array
Seems like gcc thinks we're trying to get the number of elements in our
array or something like that. It then suggests adding parentheses to
silence the warning.
This commit is contained in:
Jean-Marc Valin 2024-02-20 14:11:57 -05:00
parent b75bd48d82
commit 512e6270ea
No known key found for this signature in database
GPG key ID: 5E5DD9A36F9189C8

View file

@ -141,7 +141,7 @@ extern char *global_stack_top;
#else
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/sizeof(char)),(stack)+=(size)*(sizeof(type)/sizeof(char)),(type*)((stack)-(size)*(sizeof(type)/sizeof(char))))
#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/(sizeof(char))),(stack)+=(size)*(sizeof(type)/(sizeof(char))),(type*)((stack)-(size)*(sizeof(type)/(sizeof(char)))))
#if 0 /* Set this to 1 to instrument pseudostack usage */
#define RESTORE_STACK (printf("%ld %s:%d\n", global_stack-scratch_ptr, __FILE__, __LINE__),global_stack = _saved_stack)
#else