[libdvdnav-devel] [PATCH] libdvdread: dvd_udf.c - comment out unused macro

Steve Dibb beandog at gentoo.org
Sat Apr 26 21:02:57 CEST 2014


Fixes warning:

src/dvd_udf.c:322:9: warning: macro is not used [-Wunused-macros]
#define GETN3(p) ((uint32_t)data[p] | ((uint32_t)data[(p) + 1] << 8)    \
         ^

Comments out the macro, but leaves it in the code as a point of 
reference, if needed:

diff --git a/src/dvd_udf.c b/src/dvd_udf.c
index 1f72e2c..49ddc99 100644
--- a/src/dvd_udf.c
+++ b/src/dvd_udf.c
@@ -319,8 +319,10 @@ static int SetUDFCache(dvd_reader_t *device, 
UDFCacheType type,
  /* For direct data access, LSB first */
  #define GETN1(p) ((uint8_t)data[p])
  #define GETN2(p) ((uint16_t)data[p] | ((uint16_t)data[(p) + 1] << 8))
+/*
  #define GETN3(p) ((uint32_t)data[p] | ((uint32_t)data[(p) + 1] << 8)    \
                    | ((uint32_t)data[(p) + 2] << 16))
+*/
  #define GETN4(p) ((uint32_t)data[p]                     \
                    | ((uint32_t)data[(p) + 1] << 8)      \
                    | ((uint32_t)data[(p) + 2] << 16)     \


More information about the libdvdnav-devel mailing list