From 808cea847ffe7f8327c760b4d7aca14f8e5adcd9 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 1f9b4a370df..033b7f100f6 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 a85d8a8d5a9..f2a76e9df96 100644 --- a/setup.py +++ b/setup.py @@ -996,7 +996,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 63d78f84daa..adbb7f6cc71 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 ||