ryanqq / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

r2710 introduces build warnings #290

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
cmake -DBUILD_TESTING:BOOL=ON -DBUILD_THIRDPARTY:BOOL=ON 
-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 -DBUILD_SHARED_LIBS:bool=OFF
make

What is the expected output? What do you see instead?
No warnings (on openjp2 lib)
Many warnings at each JAS_FPRINTF "call" 

What version of the product are you using? On what operating system?
trunk r2721 , macos 10.9.2, XCode 5.1 (using Unix makefile generator => clang 
5.1) 

Please provide any additional information below.
The following fixes build warnings

/* see issue 80 */
#if 0
#define JAS_FPRINTF fprintf
#else
static void opj_null_jas_fprintf(FILE* file, const char * format, ...)
{
  (void)file;
  (void)format;
}
#define JAS_FPRINTF opj_null_jas_fprintf
#endif

Original issue reported on code.google.com by m.darb...@gmail.com on 13 Mar 2014 at 10:56

GoogleCodeExporter commented 9 years ago
Nasty... Since variadics macros are C99. I guess I'll have to either revert my 
change and or apply your fix hoping the compiler will do proper optimization.

Original comment by mathieu.malaterre on 14 Mar 2014 at 8:41

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 14 Mar 2014 at 8:43

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2722.

Original comment by mathieu.malaterre on 14 Mar 2014 at 8:44