Disallow variable-length arrays and turn on -Wpedantic in Clang and GCC.

PiperOrigin-RevId: 562832747
Change-Id: I0532624cee31e089a47426305d885687eb0fc5c5
This commit is contained in:
Saran Tunyasuvunakool
2023-09-05 11:04:12 -07:00
committed by Copybara-Service
parent 8ffdee355a
commit 329ed193ac
17 changed files with 121 additions and 99 deletions
+2 -2
View File
@@ -140,7 +140,7 @@ static void makePlane(const mjModel* m, mjrContext* con) {
// record
grid[k][x] = left;
grid[k][x+1] = mjMAX(left, right); // just in case
grid[k][x+1] = mjMAX(left, right); // just in case
}
}
@@ -1458,7 +1458,7 @@ void GLAPIENTRY debugCallback(GLenum source,
// returns 1 if MUJOCO_GL_DEBUG environment variable is set to 1
static int glDebugEnabled() {
static int glDebugEnabled(void) {
char* debug = getenv("MUJOCO_GL_DEBUG");
return debug && strcmp(debug, "1") == 0;
}