Opened 8 years ago

Closed 8 years ago

#12653 closed enhancement (fixed)

Edit JPEG translator to remove warnings, allow -Werror

Reported by: MichaelCrawford Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #9460
Platform: All

Description

Bug #9460 reports that the JPEG translator cannot be built with -Werror. I'm looking for something useful to get myself back into Haiku development, and have lots of experience with graphics codecs.

I haven't looked at the source nor tried a build yet.

Attachments (1)

0001-Silence-warning-about-possibly-clobbered-outFile-due.patch (1.8 KB ) - added by MichaelCrawford 8 years ago.
Silence warning in JPEGTranslator, enable -Werror in the build

Download all attachments as: .zip

Change History (4)

comment:1 by MichaelCrawford, 8 years ago

There was just one warning, line 766 of JPEGTranslator.cpp, outType might be clobbered by 'longjmp' or 'vfork'.

outType is a uint32, and so is likely stored in a register. The setjmp stores the registeres in the jmp_buf. The solution appears to be to declare outType volatile, so it is stored on the stack. In this particular routine doing so will have a negligible effect on performance

by MichaelCrawford, 8 years ago

Silence warning in JPEGTranslator, enable -Werror in the build

comment:2 by MichaelCrawford, 8 years ago

patch: 01

comment:3 by pulkomandy, 8 years ago

Resolution: fixed
Status: newclosed

Fixed in a different way in hrev50404.

Note: See TracTickets for help on using tickets.