Opened 7 years ago
Closed 7 years ago
#12653 closed enhancement (fixed)
Edit JPEG translator to remove warnings, allow -Werror
|Reported by:||MichaelCrawford||Owned by:||nobody|
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.
Change History (4)
comment:1 by , 7 years ago
by , 7 years ago
Silence warning in JPEGTranslator, enable -Werror in the build
comment:2 by , 7 years ago
|patch:||0 → 1|
comment:3 by , 7 years ago
|Status:||new → closed|
Fixed in a different way in hrev50404.
Note: See TracTickets for help on using tickets.
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