diff --git a/platforms/common/include/px4_platform_common/posix.h b/platforms/common/include/px4_platform_common/posix.h index e8664c13fe..b1cada1019 100644 --- a/platforms/common/include/px4_platform_common/posix.h +++ b/platforms/common/include/px4_platform_common/posix.h @@ -131,7 +131,7 @@ __END_DECLS // we often run out of stack space when pointers are larger than 4 bytes. // Double the stack size on posix when we're on a 64-bit architecture. // Most full-scale OS use 1-4K of memory from the stack themselves -#define PX4_STACK_ADJUSTED(_s) (_s * (sizeof(void *) >> 2) + PX4_STACK_OVERHEAD) +#define PX4_STACK_ADJUSTED(_s) ((_s) * (sizeof(void *) >> 2) + PX4_STACK_OVERHEAD) __BEGIN_DECLS diff --git a/platforms/posix/include/windows_shim/fcntl.h b/platforms/posix/include/windows_shim/fcntl.h index cf201f330b..a1c192452e 100644 --- a/platforms/posix/include/windows_shim/fcntl.h +++ b/platforms/posix/include/windows_shim/fcntl.h @@ -103,7 +103,7 @@ #undef ERROR #endif #if defined(__PX4_POSIX) -#define ERROR -1 +#define ERROR (-1) #endif #ifdef IGNORE #undef IGNORE