Bug 252666 - Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix
Summary: Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-21 07:57 PST by Giulio Benetti
Modified: 2023-02-21 15:05 PST (History)
2 users (show)

See Also:


Attachments
Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix (1.52 KB, patch)
2023-02-21 07:57 PST, Giulio Benetti
no flags Details | Formatted Diff | Diff
Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix (1.66 KB, patch)
2023-02-21 08:08 PST, Giulio Benetti
mcatanzaro: review+
mcatanzaro: commit-queue-
Details | Formatted Diff | Diff
Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix (1.73 KB, patch)
2023-02-21 09:51 PST, Giulio Benetti
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Giulio Benetti 2023-02-21 07:57:14 PST
Created attachment 465108 [details]
Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix

jpeglib.h contains a typedef enum for boolean type but LCMSUniquePtr.h include files that can contain #define TRUE/FALSE.
This way build fails with:
JPEGImageDecoder.cpp:343:43: error: invalid conversion from ‘int’ to ‘boolean’

This is because TRUE or FALSE should be an enum instead they get defined as 1 or 0.
Comment 1 Giulio Benetti 2023-02-21 08:08:03 PST
Created attachment 465109 [details]
Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix

Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix
https://bugs.webkit.org/show_bug.cgi?id=252666

Reviewed by NOBODY (OOPS!).

jpeglib.h contains a typedef enum for boolean type but LCMSUniquePtr.h
include files that can contain #define TRUE/FALSE. This way build fails
with:
JPEGImageDecoder.cpp:343:43: error: invalid conversion from ‘int’ to ‘boolean’

This is because TRUE or FALSE should be an enum instead they get defined
as 1 or 0. To fix this move jpeglib.h inclusion after LCMSUniquePtr.h
inclusion.

Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h:
Comment 2 Michael Catanzaro 2023-02-21 09:15:51 PST
Comment on attachment 465109 [details]
Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix

View in context: https://bugs.webkit.org/attachment.cgi?id=465109&action=review

Sigh, OK....

> Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h:41
> +#include "jpeglib.h"

Preexisting issue: should be #include <jpeglib.h>
Comment 3 Giulio Benetti 2023-02-21 09:51:52 PST
Created attachment 465111 [details]
Fix JPEGImageDecoder boolean enum and #define TRUE/FALSE mix

I've just pushed --force to branch and attached I use angular parenthesis.
Comment 4 EWS 2023-02-21 15:05:15 PST
Committed 260633@main (360f2f938bba): <https://commits.webkit.org/260633@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 465111 [details].