From 3e3032cfa044268cee76735823755db274025021 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 13 Jun 2023 18:27:10 -0700 Subject: *: smattering of random small fixes to silence -Wall I thought the build was already using -Wall but that seems to not be the case, maybe got lost somewhere along the line or messed up in configure.ac After forcing a build with -Wall -Werror, these showed up. Fixed up in the obvious way, nothing too scary. --- src/libs/ray/ray_light_emitter.h | 1 + src/libs/ray/ray_render_object_point.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libs/ray') diff --git a/src/libs/ray/ray_light_emitter.h b/src/libs/ray/ray_light_emitter.h index 3b5509e..4a1dce5 100644 --- a/src/libs/ray/ray_light_emitter.h +++ b/src/libs/ray/ray_light_emitter.h @@ -5,6 +5,7 @@ #include "ray_object_sphere.h" typedef enum ray_light_emitter_type_t { + RAY_LIGHT_EMITTER_TYPE_SENTINEL, /* TODO: this is fragile, the enum values align with ray_object_type_t so the object-specific .type can be assigned as object types to silence compiler warnings, without producing wrong type values in the ray_light_emitter_t.type. What should probably be done is splitting out the rudimentary objects into even simpler structs without a type member so we can have light variants and object variants each with their own enum typed type members... not now. */ RAY_LIGHT_EMITTER_TYPE_SPHERE, RAY_LIGHT_EMITTER_TYPE_POINT, } ray_light_emitter_type_t; diff --git a/src/libs/ray/ray_render_object_point.h b/src/libs/ray/ray_render_object_point.h index 52c6fd6..3479c22 100644 --- a/src/libs/ray/ray_render_object_point.h +++ b/src/libs/ray/ray_render_object_point.h @@ -31,7 +31,7 @@ static inline int ray_render_object_point_intersects_ray(ray_render_object_point static inline ray_3f_t ray_render_object_point_normal(ray_render_object_point_t *point, ray_3f_t *_point) { - ray_3f_t normal; + ray_3f_t normal = {}; return normal; } -- cgit v1.2.3