From ffb9fbae31e2855baeec3fd0141b304775da9b61 Mon Sep 17 00:00:00 2001 From: Nunuhara Cabbage Date: Mon, 23 Jun 2025 19:04:52 -0700 Subject: [PATCH] Silence spurious warnings None of these are actual bugs as far as I can tell. --- src/3d/particle.c | 2 +- src/audio_meta.c | 2 +- src/ffi.c | 3 +++ src/hll/vmArray.c | 5 +++-- src/resume.c | 2 ++ subprojects/libsys4 | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/3d/particle.c b/src/3d/particle.c index 723cf20..b4386a5 100644 --- a/src/3d/particle.c +++ b/src/3d/particle.c @@ -943,7 +943,7 @@ void particle_object_calc_local_transform(struct RE_instance *inst, struct parti struct pae_object *pae_obj = po->pae_obj; float t = glm_percent(pi->begin_frame, pi->end_frame, frame); - vec3 pos, up_vector; + vec3 pos = {0}, up_vector; calc_pos_and_up_vector(po, pi, t, pos, up_vector); float rel_frame = frame - pi->begin_frame; diff --git a/src/audio_meta.c b/src/audio_meta.c index 01cfb50..edb3875 100644 --- a/src/audio_meta.c +++ b/src/audio_meta.c @@ -31,7 +31,7 @@ static struct bgi bgi_data[BGI_MAX]; static char *bgi_gets(char *buf, int n, FILE *fp) { char *s = buf; - int c; + int c = EOF; while (--n > 0 && (c = fgetc(fp)) != EOF) { c = c >> 4 | (c & 0xf) << 4; // decrypt *s++ = c; diff --git a/src/ffi.c b/src/ffi.c index 0c7270f..529ee21 100644 --- a/src/ffi.c +++ b/src/ffi.c @@ -395,7 +395,10 @@ void hll_call(int libno, int fno) stack_push(slot); break; case AIN_BOOL: +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" stack_push(*(bool*)&r); +#pragma GCC diagnostic pop break; default: stack_push(r); diff --git a/src/hll/vmArray.c b/src/hll/vmArray.c index e7a91aa..e54459b 100644 --- a/src/hll/vmArray.c +++ b/src/hll/vmArray.c @@ -15,6 +15,7 @@ */ #include +#include #include "hll.h" #include "vm/page.h" @@ -408,7 +409,7 @@ static int vmArray_GrepLowOrder(struct page *s_array, int index, struct page **d if (index < 0) VM_ERROR("not implemented"); - int min_index = -1, min_value; + int min_index = -1, min_value = INT_MAX; for (int i = index; i < s_array->nr_vars; i++) { if (d_array->values[i].i) continue; @@ -434,7 +435,7 @@ static int vmArray_GrepHighOrder(struct page *s_array, int index, struct page ** if (index < 0) VM_ERROR("not implemented"); - int max_index = -1, max_value; + int max_index = -1, max_value = INT_MIN; for (int i = index; i < s_array->nr_vars; i++) { if (d_array->values[i].i) continue; diff --git a/src/resume.c b/src/resume.c index d9ae08f..b86a595 100644 --- a/src/resume.c +++ b/src/resume.c @@ -417,6 +417,7 @@ int vm_save_image(const char *key, const char *path) case SAVE_FORMAT_JSON: return save_json_image(key, path); } + return 0; } #define _invalid_save_data(file, func, line, fmt, ...) \ @@ -1028,4 +1029,5 @@ int vm_write_image_comments(const char *key, const char *path, struct page *comm case SAVE_FORMAT_JSON: return write_json_image_comments(key, path, comments); } + return 0; } diff --git a/subprojects/libsys4 b/subprojects/libsys4 index 3f44e18..e8cc60f 160000 --- a/subprojects/libsys4 +++ b/subprojects/libsys4 @@ -1 +1 @@ -Subproject commit 3f44e18aaaa86b58003cb42f89554758506d3620 +Subproject commit e8cc60ff4980d6d8f81dcc1f07f87ba5db30059c