[libbluray-devel] Silence compiler warnings

hpi1 git at videolan.org
Tue Nov 18 21:54:56 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Nov 18 22:19:06 2014 +0200| [b5145be3abc546d645f47df454253858f6102aa1] | committer: hpi1

Silence compiler warnings

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=b5145be3abc546d645f47df454253858f6102aa1
---

 src/file/dl_win32.c                    |    2 ++
 src/libbluray/bdnav/meta_parse.c       |    4 ++++
 src/libbluray/bluray.c                 |   10 +++++++++-
 src/libbluray/decoders/textst_render.c |   14 ++++++++++++++
 4 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/file/dl_win32.c b/src/file/dl_win32.c
index 7233856..afb9e4e 100644
--- a/src/file/dl_win32.c
+++ b/src/file/dl_win32.c
@@ -55,6 +55,8 @@ static const char *dlerror(char *buf, int buf_size)
 
 void *dl_dlopen(const char *path, const char *version)
 {
+    (void)version;
+
     wchar_t wname[MAX_PATH];
     char *name;
     void *result;
diff --git a/src/libbluray/bdnav/meta_parse.c b/src/libbluray/bdnav/meta_parse.c
index 3cd9abd..a74ed6e 100644
--- a/src/libbluray/bdnav/meta_parse.c
+++ b/src/libbluray/bdnav/meta_parse.c
@@ -195,6 +195,7 @@ META_ROOT *meta_parse(const char *device_path)
     xmlCleanupParser();
     return root;
 #else
+    (void)device_path;
     BD_DEBUG(DBG_DIR, "configured without libxml2 - can't parse meta info\n");
     return NULL;
 #endif
@@ -229,12 +230,15 @@ const META_DL *meta_get(const META_ROOT *meta_root, const char *language_code)
     BD_DEBUG(DBG_DIR, "requested disclib language '%s' or default '"DEFAULT_LANGUAGE"' not found, using '%s' instead\n", language_code, meta_root->dl_entries[0].language_code);
     return &meta_root->dl_entries[0];
 #else
+    (void)meta_root;
+    (void)language_code;
     return NULL;
 #endif
 }
 
 void meta_free(META_ROOT **p)
 {
+    (void)p;
 #ifdef HAVE_LIBXML2
     if (p && *p)
     {
diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index e1aa662..3980039 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1291,6 +1291,7 @@ static int _start_bdj(BLURAY *bd, unsigned title)
 
     return !bdj_process_event(bd->bdjava, BDJ_EVENT_START, title);
 #else
+    (void)bd;
     BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Title %d: BD-J not compiled in\n", title);
     return 0;
 #endif
@@ -1305,7 +1306,7 @@ static int _bdj_event(BLURAY *bd, unsigned ev, unsigned param)
     return -1;
 }
 #else
-#define _bdj_event(bd, ev, param) (bd=bd, -1)
+#define _bdj_event(bd, ev, param) do{}while(0)
 #endif
 
 #ifdef USING_BDJAVA
@@ -3434,8 +3435,10 @@ int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key)
 
     if (bd->title_type == title_hdmv) {
         result = _run_gc(bd, GC_CTRL_VK_KEY, key);
+#ifdef USING_BDJAVA
     } else if (bd->title_type == title_bdj) {
         result = _bdj_event(bd, BDJ_EVENT_VK_KEY, key);
+#endif
     }
 
     bd_mutex_unlock(&bd->mutex);
@@ -3474,6 +3477,11 @@ void bd_register_argb_overlay_proc(BLURAY *bd, void *handle, bd_argb_overlay_pro
     bd->argb_buffer              = buf;
 
     bd_mutex_unlock(&bd->argb_buffer_mutex);
+#else
+    (void)bd;
+    (void)handle;
+    (void)func;
+    (void)buf;
 #endif
 }
 
diff --git a/src/libbluray/decoders/textst_render.c b/src/libbluray/decoders/textst_render.c
index ffb18a2..1e146d5 100644
--- a/src/libbluray/decoders/textst_render.c
+++ b/src/libbluray/decoders/textst_render.c
@@ -125,7 +125,12 @@ int textst_render_add_font(TEXTST_RENDER *p, const char *file)
     }
 
     TEXTST_ERROR("Loading font %s failed\n", file);
+
+#else
+    (void)p;
+    (void)file;
 #endif
+
     return -1;
 }
 
@@ -137,6 +142,10 @@ int textst_render_set_char_code(TEXTST_RENDER *p, int char_code)
         TEXTST_ERROR("WARNING: unsupported TextST coding type %d\n", char_code);
         return -1;
     }
+
+#else
+    (void)p;
+    (void)char_code;
 #endif
 
     return 0;
@@ -421,6 +430,11 @@ int textst_render(TEXTST_RENDER *p,
         ypos += s.line_space - baseline;
     }
 
+#else
+    (void)p;
+    (void)bmp;
+    (void)base_style;
+    (void)region;
 #endif /* HAVE_FT2 */
 
     return 0;



More information about the libbluray-devel mailing list