Make linux/BSD workflows treat warnings as errors

This commit is contained in:
UnknownShadow200 2025-08-04 20:57:32 +10:00
parent 7c326bb2a2
commit d28bf267a1
9 changed files with 17 additions and 15 deletions

View File

@ -43,7 +43,7 @@ jobs:
env:
LIBS: "-lm -lpthread -lX11 -lXi -lGL -lexecinfo"
SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic -Werror"
PLAT32_FLAGS: "-fno-pie -fcf-protection=none -I freebsd32/include -L freebsd32/lib"
PLAT64_FLAGS: "-fno-pie -fcf-protection=none -I freebsd64/include -L freebsd64/lib"

View File

@ -43,7 +43,7 @@ jobs:
env:
LIBS: "-lX11 -lXi -lpthread -lGL -lm -ldl"
SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic -Werror"
NIX32_FLAGS: "-no-pie -fno-pie -m32 -fcf-protection=none -L ./lib -Wl,--unresolved-symbols=ignore-in-shared-libs"
run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
@ -107,7 +107,7 @@ jobs:
env:
LIBS: "-lX11 -lXi -lpthread -lGL -lm -ldl"
SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -fvisibility=hidden -rdynamic -Werror"
NIX64_FLAGS: "-no-pie -fno-pie -m64 -fcf-protection=none -rdynamic -L ./lib -Wl,--unresolved-symbols=ignore-in-shared-libs"
run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"

View File

@ -37,7 +37,7 @@ jobs:
env:
LIBS: "-lm -lpthread -lX11 -lXi -lGL -lexecinfo"
SRCS: "src/*.c third_party/bearssl/*.c"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -Wl,-R/usr/X11R7/lib -fvisibility=hidden -rdynamic"
FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Werror -Wl,-R/usr/X11R7/lib -fvisibility=hidden -rdynamic -Werror"
PLAT64_FLAGS: "-fno-pie -fcf-protection=none -I netbsd64/include -L netbsd64/lib -Wl,--unresolved-symbols=ignore-in-shared-libs"
run: |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"

View File

@ -66,15 +66,15 @@ void Entity_GetTransform(struct Entity* e, Vec3 pos, Vec3 scale, struct Matrix*
struct Matrix tmp;
Matrix_Scale(m, scale.x, scale.y, scale.z);
if (e->RotZ) {
if (e->RotZ != 0.0f) {
Matrix_RotateZ( &tmp, -e->RotZ * MATH_DEG2RAD);
Matrix_MulBy(m, &tmp);
}
if (e->RotX) {
if (e->RotX != 0.0f) {
Matrix_RotateX( &tmp, -e->RotX * MATH_DEG2RAD);
Matrix_MulBy(m, &tmp);
}
if (e->RotY) {
if (e->RotY != 0.0f) {
Matrix_RotateY( &tmp, -e->RotY * MATH_DEG2RAD);
Matrix_MulBy(m, &tmp);
}

View File

@ -840,7 +840,7 @@ void Game_RenderFrame(void) {
if (Game_ScreenshotRequested) Game_TakeScreenshot();
Gfx_EndFrame();
if (gfx_minFrameMs) LimitFPS();
if (gfx_minFrameMs != 0.0f) LimitFPS();
}
void Game_Free(void) {

View File

@ -1084,9 +1084,9 @@ static void CheckResourcesScreen_Activated(struct LScreen* s_) {
}
static void CheckResourcesScreen_ResetArea(struct Context2D* ctx, int x, int y, int width, int height) {
int R = BitmapCol_R(Launcher_Theme.BackgroundColor) * 0.78f; /* 153 -> 120 */
int G = BitmapCol_G(Launcher_Theme.BackgroundColor) * 0.70f; /* 127 -> 89 */
int B = BitmapCol_B(Launcher_Theme.BackgroundColor) * 0.88f; /* 172 -> 151 */
float R = BitmapCol_R(Launcher_Theme.BackgroundColor) * 0.78f; /* 153 -> 120 */
float G = BitmapCol_G(Launcher_Theme.BackgroundColor) * 0.70f; /* 127 -> 89 */
float B = BitmapCol_B(Launcher_Theme.BackgroundColor) * 0.88f; /* 172 -> 151 */
Gradient_Noise(ctx, BitmapColor_RGB(R, G, B), 4, x, y, width, height);
}

View File

@ -209,10 +209,13 @@ static cc_result Stream_PortionSkip(struct Stream* s, cc_uint32 count) {
}
static cc_result Stream_PortionPosition(struct Stream* s, cc_uint32* position) {
*position = s->meta.portion.length - s->meta.portion.left; return 0;
*position = s->meta.portion.length - s->meta.portion.left;
return 0;
}
static cc_result Stream_PortionLength(struct Stream* s, cc_uint32* length) {
*length = s->meta.portion.length; return 0;
*length = s->meta.portion.length;
return 0;
}
void Stream_ReadonlyPortion(struct Stream* s, struct Stream* source, cc_uint32 len) {

View File

@ -14,7 +14,7 @@ void Vec3_Normalise(Vec3* v) {
float scale, lenSquared;
lenSquared = v->x * v->x + v->y * v->y + v->z * v->z;
/* handle zero vector */
if (!lenSquared) return;
if (lenSquared == 0.0f) return;
scale = 1.0f / Math_SqrtF(lenSquared);
v->x = v->x * scale;

View File

@ -113,7 +113,6 @@ static void Stopwatch_Init(void) {
cpu_frt_ovi_set(ovf_handler);
cpu_frt_interrupt_priority_set(15);
cpu_frt_count_set(0);
}