]> git.lizzy.rs Git - dragonblocks_alpha.git/commitdiff
Disable pedantic warnings
authorElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 17 Jan 2022 12:49:24 +0000 (13:49 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 17 Jan 2022 12:49:24 +0000 (13:49 +0100)
src/CMakeLists.txt
src/client/frustum.c
src/client/gui.c
src/client/object.c
src/client/scene.c
src/client/sky.c
src/server/voxelctx.c

index 0adb599d915c118d2c7d9ad405172cd39b7a8c32..4720f08d0621a6781d1499e93027c0e12f7fd8c2 100644 (file)
@@ -37,7 +37,7 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
        include_directories("/usr/X11R6/include")
 endif()
 
-add_compile_options(-Wall -Wextra -Wpedantic -Werror)
+add_compile_options(-Wall -Wextra -Werror)
 
 set(DEPS_SOURCES
        "${DEPS_DIR}/dragontype/array.c"
index 7c83163a96de3bec507b80c0f790ac7783834731..e05d6495a6b5dc1c06ba0927ceea2a351435b5f4 100644 (file)
@@ -29,10 +29,7 @@ void frustum_update(mat4x4 view_proj)
 {
        mat4x4 m;
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_transpose(m, view_proj);
-#pragma GCC diagnostic pop
 
        vec4_add(frustum.planes[PLANE_LEFT], m[3], m[0]);
        vec4_sub(frustum.planes[PLANE_RIGHT], m[3], m[0]);
index bb90caeeca9e53b5e9f276863a1ee723ae7fe8f2..5fc58b7781108d2ce1063fe6a101fb05f3c60c61 100644 (file)
@@ -416,11 +416,7 @@ static void calculate_element_transform(GUIElement *element)
 
        mat4x4_translate(element->transform, element->pos.x - element->def.margin.x, element->pos.y - element->def.margin.y, 0.0f);
        mat4x4_translate(element->text_transform, element->pos.x, element->pos.y, 0.0f);
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_scale_aniso(element->transform, element->transform, element->scale.x + element->def.margin.x * 2.0f, element->scale.y + element->def.margin.y * 2.0f, 1.0f);
-#pragma GCC diagnostic pop
 
        bintree_traverse(&element->children, BTT_INORDER, &bintree_calculate_element_transform, NULL);
 }
index e7f3c85b370e50ca471ae7d6d5c4d3ddeec234bf..247d985d31e31d53460a08d8b04c7843ac8791ad 100644 (file)
@@ -176,11 +176,8 @@ bool object_add_to_scene(Object *obj)
 void object_transform(Object *obj)
 {
        mat4x4_translate(obj->transform, obj->pos.x, obj->pos.y, obj->pos.z);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_rotate(obj->transform, obj->transform, obj->rot.x, obj->rot.y, obj->rot.z, obj->angle);
        mat4x4_scale_aniso(obj->transform, obj->transform, obj->scale.x, obj->scale.y, obj->scale.z);
-#pragma GCC diagnostic pop
 }
 
 bool object_before_render(Object *obj, f64 dtime)
index 9339b0691ff3e9174830984fe7c1d939eb4fad99..d560c748dd22491c59eef60f433f5c764bb65139 100644 (file)
@@ -76,21 +76,15 @@ static void bintree_render_object(BintreeNode *node, unused void *arg)
 
 void scene_render(f64 dtime)
 {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_mul(scene.VP, scene.projection, camera.view);
-#pragma GCC diagnostic pop
 
        vec4 base_sunlight_dir = {0.0f, 0.0f, -1.0f, 1.0f};
        vec4 sunlight_dir;
        mat4x4 sunlight_mat;
        mat4x4_identity(sunlight_mat);
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_rotate(sunlight_mat, sunlight_mat, 1.0f, 0.0f, 0.0f, get_sun_angle() + M_PI / 2.0f);
        mat4x4_mul_vec4(sunlight_dir, sunlight_mat, base_sunlight_dir);
-#pragma GCC diagnostic pop
 
        frustum_update(scene.VP);
 
index 30e161229217d05162b71bab8f762cff8a1692b3..248a4b843bae845025464a9458ffefe455e72eaf 100644 (file)
@@ -201,8 +201,7 @@ void sky_deinit()
        mesh_delete(sky.sun_mesh);
 }
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
+
 void sky_render()
 {
        f64 daylight = get_daylight();
@@ -248,4 +247,3 @@ void sky_render()
        glDepthFunc(GL_LESS);
        glEnable(GL_CULL_FACE);
 }
-#pragma GCC diagnostic pop
index 3e8999ecbcfc0b4ae314c247701f156e9a9989b5..5fe9a9f7247085f28099d8e7e60bb250a4a13160 100644 (file)
@@ -112,10 +112,7 @@ void voxelctx_life(Voxelctx *ctx, s32 value)
 static void apply_translation(Voxelctx *ctx, v3f32 translate)
 {
        vec4 translate_vec;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_mul_vec4(translate_vec, VOXELCTXSTATE(ctx).mat, (vec4) {translate.x, translate.y, translate.z, 0.0f});
-#pragma GCC diagnostic pop
        vec4_add(VOXELCTXSTATE(ctx).pos, VOXELCTXSTATE(ctx).pos, translate_vec);
 }
 
@@ -137,28 +134,18 @@ void voxelctx_y(Voxelctx *ctx, f32 value)
 
 void voxelctx_rx(Voxelctx *ctx, f32 value)
 {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_rotate_X(VOXELCTXSTATE(ctx).mat, VOXELCTXSTATE(ctx).mat, value * M_PI / 180.0f);
-#pragma GCC diagnostic pop
 }
 
 // swap y and z
 void voxelctx_rz(Voxelctx *ctx, f32 value)
 {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
-
        mat4x4_rotate_Y(VOXELCTXSTATE(ctx).mat, VOXELCTXSTATE(ctx).mat, value * M_PI / 180.0f);
-#pragma GCC diagnostic pop
 }
 
 void voxelctx_ry(Voxelctx *ctx, f32 value)
 {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_rotate_Z(VOXELCTXSTATE(ctx).mat, VOXELCTXSTATE(ctx).mat, value * M_PI / 180.0f);
-#pragma GCC diagnostic pop
 }
 
 static void apply_scale(Voxelctx *ctx, v3f32 scale)
@@ -167,10 +154,7 @@ static void apply_scale(Voxelctx *ctx, v3f32 scale)
        VOXELCTXSTATE(ctx).scale[1] *= scale.y;
        VOXELCTXSTATE(ctx).scale[2] *= scale.z;
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
        mat4x4_scale_aniso(VOXELCTXSTATE(ctx).mat, VOXELCTXSTATE(ctx).mat, scale.x, scale.y, scale.z);
-#pragma GCC diagnostic pop
 }
 
 void voxelctx_sx(Voxelctx *ctx, f32 value)
@@ -245,16 +229,11 @@ void voxelctx_cube(Voxelctx *ctx, Node node, bool use_color)
        s32 max_len = 0;
 
        vec4 center;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
+
        mat4x4_mul_vec4(center, VOXELCTXSTATE(ctx).mat, (vec4) {0.5f, 0.5f, 0.5f});
-#pragma GCC diagnostic pop
 
        for (int i = 0; i < 8; i++) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
                mat4x4_mul_vec4(corners[i], VOXELCTXSTATE(ctx).mat, base_corners[i]);
-#pragma GCC diagnostic pop
 
                vec3 from_center;
                vec3_sub(from_center, corners[i], center);