summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/libdvdread/A01-clang-warnings.patch13
-rw-r--r--libhb/encavcodec.c2
-rw-r--r--libhb/stream.c18
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj5
4 files changed, 15 insertions, 23 deletions
diff --git a/contrib/libdvdread/A01-clang-warnings.patch b/contrib/libdvdread/A01-clang-warnings.patch
new file mode 100644
index 000000000..2ecc2ce0a
--- /dev/null
+++ b/contrib/libdvdread/A01-clang-warnings.patch
@@ -0,0 +1,13 @@
+diff --git a/src/dvdread/ifo_types.h b/src/dvdread/ifo_types.h
+index f679d29..699853f 100644
+--- a/src/dvdread/ifo_types.h
++++ b/src/dvdread/ifo_types.h
+@@ -30,7 +30,7 @@
+ #undef PRAGMA_PACK_BEGIN
+ #undef PRAGMA_PACK_END
+
+-#if defined(__GNUC__)
++#if defined(__GNUC__) && !defined(__clang__)
+ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+ #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ #define ATTRIBUTE_PACKED __attribute__ ((packed,gcc_struct)) \ No newline at end of file
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index 1c949249c..75c6c679b 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -863,7 +863,7 @@ static void Encode( hb_work_object_t *w, hb_buffer_t *in,
hb_buffer_list_t *list )
{
hb_work_private_t * pv = w->private_data;
- AVFrame frame = {0};
+ AVFrame frame = {{0}};
int ret;
frame.width = in->f.width;
diff --git a/libhb/stream.c b/libhb/stream.c
index feb390c07..77a09e8b1 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -278,8 +278,6 @@ static int ffmpeg_seek_ts( hb_stream_t *stream, int64_t ts );
static inline unsigned int bits_get(bitbuf_t *bb, int bits);
static inline void bits_init(bitbuf_t *bb, uint8_t* buf, int bufsize, int clear);
static inline unsigned int bits_peek(bitbuf_t *bb, int bits);
-static inline int bits_eob(bitbuf_t *bb);
-static inline int bits_read_ue(bitbuf_t *bb );
static void pes_add_audio_to_title(hb_stream_t *s, int i, hb_title_t *t, int sort);
static int hb_parse_ps( hb_stream_t *stream, uint8_t *buf, int len, hb_pes_info_t *pes_info );
static void hb_ts_resolve_pid_types(hb_stream_t *stream);
@@ -2487,11 +2485,6 @@ static inline int bits_bytes_left(bitbuf_t *bb)
return bb->size - (bb->pos >> 3);
}
-static inline int bits_eob(bitbuf_t *bb)
-{
- return bb->pos >> 3 == bb->size;
-}
-
static inline unsigned int bits_peek(bitbuf_t *bb, int bits)
{
unsigned int val;
@@ -2551,17 +2544,6 @@ static inline unsigned int bits_get(bitbuf_t *bb, int bits)
return val;
}
-static inline int bits_read_ue(bitbuf_t *bb )
-{
- int ii = 0;
-
- while( bits_get( bb, 1 ) == 0 && !bits_eob( bb ) && ii < 32 )
- {
- ii++;
- }
- return( ( 1 << ii) - 1 + bits_get( bb, ii ) );
-}
-
static inline int bits_skip(bitbuf_t *bb, int bits)
{
if (bits <= 0)
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index aa075fd51..b9ddabf9e 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -2490,7 +2490,6 @@
HBKitLocalizedString,
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
- OTHER_CFLAGS = "-Wno-duplicate-decl-specifier ";
OTHER_LDFLAGS = (
"-filelist",
"$(EXTERNAL_BUILD)/macosx/osl.filelist.txt",
@@ -2570,7 +2569,6 @@
HBKitLocalizedString,
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
- OTHER_CFLAGS = "-Wno-duplicate-decl-specifier ";
OTHER_LDFLAGS = (
"-filelist",
"$(EXTERNAL_BUILD)/macosx/osl.filelist.txt",
@@ -3292,7 +3290,6 @@
HBKitLocalizedString,
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
- OTHER_CFLAGS = "-Wno-duplicate-decl-specifier ";
OTHER_LDFLAGS = (
"-filelist",
"$(EXTERNAL_BUILD)/macosx/osl.filelist.txt",
@@ -3557,11 +3554,11 @@
HBKitLocalizedString,
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
- OTHER_CFLAGS = "-Wno-duplicate-decl-specifier ";
OTHER_LDFLAGS = (
"-filelist",
"$(EXTERNAL_BUILD)/macosx/osl.filelist.txt",
"-lc++",
+ "-w",
);
SDKROOT = macosx;
SHARED_PRECOMPS_DIR = "$(CONFIGURATION_TEMP_DIR)/PrecompiledHeaders";