From 4e6d8ff6ff010eee01efbaf94b7a6b3949424066 Mon Sep 17 00:00:00 2001 From: Yay295 Date: Thu, 25 Apr 2024 19:54:47 -0500 Subject: [PATCH] in progress --- Makefile | 2 +- setup.py | 2 +- src/_imagingcms.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 94f7565d826..65b198f580a 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ debug: # for our stuff, kills optimization, and redirects to dev null so we # see any build failures. make clean > /dev/null - CFLAGS='-g -O0' python3 -m pip -v install . > /dev/null + CFLAGS='-g -O2 -std=c99 -Wall -Wlogical-op' python3 -m pip -v install . > /dev/null .PHONY: release-test release-test: diff --git a/setup.py b/setup.py index 200fc92e9cc..d1817e07280 100644 --- a/setup.py +++ b/setup.py @@ -999,7 +999,7 @@ def debug_build(): ext_modules = [ Extension("PIL._imaging", files, libraries=["pil_imaging_mode"]), Extension("PIL._imagingft", ["src/_imagingft.c"], libraries=["pil_imaging_mode"]), - Extension("PIL._imagingcms", ["src/_imagingcms.c"]), + Extension("PIL._imagingcms", ["src/_imagingcms.c"], libraries=["pil_imaging_mode"]), Extension("PIL._webp", ["src/_webp.c"], libraries=["pil_imaging_mode"]), Extension("PIL._imagingtk", ["src/_imagingtk.c", "src/Tk/tkImaging.c"]), Extension("PIL._imagingmath", ["src/_imagingmath.c"]), diff --git a/src/_imagingcms.c b/src/_imagingcms.c index 2b9612db73d..4dff47aaf79 100644 --- a/src/_imagingcms.c +++ b/src/_imagingcms.c @@ -212,7 +212,8 @@ cms_transform_dealloc(CmsTransformObject *self) { /* internal functions */ static cmsUInt32Number -findLCMStype(char *PILmode) { +findLCMStype(const char *PILmode) { + const ModeID mode = findModeID(PILmode); if (strcmp(PILmode, "RGB") == 0 || strcmp(PILmode, "RGBA") == 0 || strcmp(PILmode, "RGBX") == 0) { return TYPE_RGBA_8;