diff --git a/Code/IO/otbJPEG2000ImageIO.cxx b/Code/IO/otbJPEG2000ImageIO.cxx
index df102622da428bfc41a5288bf0a427f32f2281f9..e9c4a4c9a5693416cb88d675682149b7ce5df9cc 100644
--- a/Code/IO/otbJPEG2000ImageIO.cxx
+++ b/Code/IO/otbJPEG2000ImageIO.cxx
@@ -35,22 +35,25 @@ extern "C"
 */
 void error_callback(const char *msg, void *client_data)
 {
+  (void) msg;
   (void) client_data;
-  itkGenericExceptionMacro(<< "OpenJPEG error: " << msg);
+  otbMsgDevMacro(<< "OpenJPEG error: " << msg);
 }
 /**
    sample warning debug callback expecting no client object
 */
 void warning_callback(const char *msg, void *client_data)
 {
+  (void) msg;
   (void) client_data;
-  otbGenericMsgDebugMacro(<< "OpenJPEG warning: " << msg);
+  otbMsgDevMacro(<< "OpenJPEG warning: " << msg);
 }
 /**
    sample debug callback expecting no client object
 */
 void info_callback(const char *msg, void *client_data)
 {
+  (void) msg;
   (void) client_data;
   otbMsgDevMacro(<< "OpenJPEG info: " << msg);
 }