[trunk] propagate the new OPJ_ symbol and type to openjpip
[openjpeg.git] / src / lib / openjp2 / event.c
index a7a52039fd7a5ae75956de12e5e2a0b56b530b46..27b8b7128119876c8cb2293a7f2e3ce940e193fe 100644 (file)
@@ -66,13 +66,17 @@ _itoa(int i, char *a, int r) {
  * Default callback function.
  * Do nothing.
  */
-static void opj_default_callback (const char *msg, void *client_data){}
+static void opj_default_callback (const char *msg, void *client_data)
+{
+    OPJ_ARG_NOT_USED(msg);
+    OPJ_ARG_NOT_USED(client_data);
+}
 
 /* ----------------------------------------------------------------------- */
 
 
 /* ----------------------------------------------------------------------- */
-opj_bool opj_event_msg_v2(opj_event_mgr_t* p_event_mgr, int event_type, const char *fmt, ...) {
+OPJ_BOOL opj_event_msg(opj_event_mgr_t* p_event_mgr, int event_type, const char *fmt, ...) {
 #define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
        opj_msg_callback msg_handler = 00;
        void * l_data = 00;
@@ -110,6 +114,7 @@ opj_bool opj_event_msg_v2(opj_event_mgr_t* p_event_mgr, int event_type, const ch
                va_start(arg, fmt);
                /* check the length of the format string */
                str_length = (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt);
+        (void)str_length;
                /* parse the format string and put the result in 'message' */
                vsprintf(message, fmt, arg); /* UniPG */
                /* deinitialize the optional parameter list */