Bug 32852 - Use ASSERT instead of assert in image-decoders
Summary: Use ASSERT instead of assert in image-decoders
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-21 22:28 PST by Kwang Yul Seo
Modified: 2009-12-21 22:57 PST (History)
4 users (show)

See Also:


Attachments
Use WTF's ASSERT macro in PNGImageDecoder.cpp and JPEGImageDecoder.cpp (2.27 KB, patch)
2009-12-21 22:32 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kwang Yul Seo 2009-12-21 22:28:07 PST
RVCT can't compile PNGImagerDecoder.cpp with the following compile error:

[1570/1814] cxx: WebCore\platform\image-decoders\png\PNGImageDecoder.cpp -> build\default\WebCore\platform\image-decoders\png\PNGImageDecoder_1.o
"..\WebCore\platform\image-decoders\png\PNGImageDecoder.cpp", line
295: Error:  #20: identifier "assert" is undefined
     assert(channels == 3 || channels == 4);
     ^
..\WebCore\platform\image-decoders\png\PNGImageDecoder.cpp: 0 warnings, 1 error
Waf: Leaving directory `C:\cygwin\home\skyul\WebKit\build'
Build failed
 -> task failed (err #1):
       {task: cxx PNGImageDecoder.cpp -> PNGImageDecoder_1.o}

After I changed #include "assert.h" to #include <assert.h>, I could compile the file without this error. I am not sure if this is a real RVCT bug. However, it seems that other decoders (BMP, GIF, ICO and XBM) use WTF's ASSERT macro instead of assert, so I suggest to change the remaining asserts in PNGImageDecoder.cpp and JPEGImageDecoder.cpp to ASSERT.
Comment 1 Kwang Yul Seo 2009-12-21 22:32:39 PST
Created attachment 45366 [details]
Use WTF's ASSERT macro in PNGImageDecoder.cpp and JPEGImageDecoder.cpp
Comment 2 WebKit Review Bot 2009-12-21 22:34:43 PST
style-queue ran check-webkit-style on attachment 45366 [details] without any errors.
Comment 3 Eric Seidel (no email) 2009-12-21 22:40:20 PST
Comment on attachment 45366 [details]
Use WTF's ASSERT macro in PNGImageDecoder.cpp and JPEGImageDecoder.cpp

LGTM.
Comment 4 WebKit Commit Bot 2009-12-21 22:57:27 PST
Comment on attachment 45366 [details]
Use WTF's ASSERT macro in PNGImageDecoder.cpp and JPEGImageDecoder.cpp

Clearing flags on attachment: 45366

Committed r52483: <http://trac.webkit.org/changeset/52483>
Comment 5 WebKit Commit Bot 2009-12-21 22:57:32 PST
All reviewed patches have been landed.  Closing bug.