From a48e0aa3550e561b2c788972a07a929d674f6c7f Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Tue, 29 Aug 2023 11:38:23 -0700 Subject: [PATCH] Use `size_t` for the `mjMARKSTACK` temporary variable. This is necessary since daa2ac7f8bcb55e23743a5f75f37f33cbfc413ed changed the type of mjData pstack from int to size_t. PiperOrigin-RevId: 561092753 Change-Id: I298507c2c0656c797637b35ee684b73eefaae8f5 --- include/mujoco/mjmacro.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/mujoco/mjmacro.h b/include/mujoco/mjmacro.h index 2c1457cf..713d5c52 100644 --- a/include/mujoco/mjmacro.h +++ b/include/mujoco/mjmacro.h @@ -15,6 +15,8 @@ #ifndef MUJOCO_MJMACRO_H_ #define MUJOCO_MJMACRO_H_ +#include + // include asan interface header, or provide stubs for poison/unpoison macros when not using asan #ifdef ADDRESS_SANITIZER #include @@ -31,7 +33,7 @@ #define mjMIN(a, b) (((a) < (b)) ? (a) : (b)) // mjData stack frame management -#define mjMARKSTACK int _mark = d->pstack; +#define mjMARKSTACK size_t _mark = d->pstack; #define mjFREESTACK d->pstack = _mark; // return current value of mjOption enable/disable flags