projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3207846
)
[trunk] Fix compilation on VS2010 (snprintf is not C89). C++11 should avoid this...
author
Mathieu Malaterre
<mathieu.malaterre@gmail.com>
Thu, 13 Mar 2014 11:03:05 +0000
(11:03 +0000)
committer
Mathieu Malaterre
<mathieu.malaterre@gmail.com>
Thu, 13 Mar 2014 11:03:05 +0000
(11:03 +0000)
tests/ppm2rgb3.c
patch
|
blob
|
history
diff --git
a/tests/ppm2rgb3.c
b/tests/ppm2rgb3.c
index 9d46f98e8bdf3366487d08f2859dcd0f7a93bf78..c9b4772ac6724a74a279781ecc600a57608e125f 100644
(file)
--- a/
tests/ppm2rgb3.c
+++ b/
tests/ppm2rgb3.c
@@
-81,6
+81,9
@@
static int writeoutput( const char *fn, FILE *ppm, int X, int Y, int bpp )
/* write single comp as PGM: P5 */
for( i = 0; i < 3; ++i )
{
+#ifdef _MSC_VER
+#define snprintf _snprintf /* Visual Studio */
+#endif
snprintf( outfn, sizeof(outfn), "%s.%s.pgm", fn, exts[i] );
outf[i] = fopen( outfn, "wb" );
if( !outf[i] ) goto cleanup;