Skip to content

Commit

Permalink
fix OS X build and CLANG warnings - also fix spelling in configure.ac
Browse files Browse the repository at this point in the history
  • Loading branch information
dbry committed Aug 26, 2016
1 parent cfdf61d commit 0b9d3a4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions cli/Makefile.am
Expand Up @@ -4,21 +4,21 @@ wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c md5.c
if WINDOWS_HOST
wavpack_SOURCES += win32_unicode_support.c
endif
wavpack_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
wavpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
if ENABLE_RPATH
wavpack_LDFLAGS = -rpath $(libdir)
endif
wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM)
wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)

wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c md5.c
if WINDOWS_HOST
wvunpack_SOURCES += win32_unicode_support.c
endif
wvunpack_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
wvunpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
if ENABLE_RPATH
wvunpack_LDFLAGS = -rpath $(libdir)
endif
wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM)
wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)

wvgain_SOURCES = wvgain.c utils.c
if WINDOWS_HOST
Expand Down
4 changes: 2 additions & 2 deletions cli/dsdiff.c
Expand Up @@ -153,7 +153,7 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
error_line ("dsdiff file version = 0x%08x", version);
}
else if (!strncmp (dff_chunk_header.ckID, "PROP", 4)) {
unsigned char *prop_chunk = malloc ((size_t) dff_chunk_header.ckDataSize);
char *prop_chunk = malloc ((size_t) dff_chunk_header.ckDataSize);

if (!DoReadFile (infile, prop_chunk, (uint32_t) dff_chunk_header.ckDataSize, &bcount) ||
bcount != dff_chunk_header.ckDataSize) {
Expand All @@ -169,7 +169,7 @@ int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpa
}

if (!strncmp (prop_chunk, "SND ", 4)) {
unsigned char *cptr = prop_chunk + 4, *eptr = prop_chunk + dff_chunk_header.ckDataSize;
char *cptr = prop_chunk + 4, *eptr = prop_chunk + dff_chunk_header.ckDataSize;
uint16_t numChannels, chansSpecified, chanMask = 0;
uint32_t sampleRate;

Expand Down
1 change: 0 additions & 1 deletion cli/wvgain.c
Expand Up @@ -29,7 +29,6 @@
#include <sys/stat.h>
#include <sys/param.h>
#include <locale.h>
#include <iconv.h>
#if defined (__GNUC__)
#include <unistd.h>
#include <glob.h>
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -59,7 +59,7 @@ AC_SYS_LARGEFILE
AC_MINGW32

AC_ARG_ENABLE([apps],
AS_HELP_STRING([--disable-apps], [build only libwavpack (removes ICONV dependancy)]))
AS_HELP_STRING([--disable-apps], [build only libwavpack (removes ICONV dependency)]))

AM_CONDITIONAL([ENABLE_APPS], [test "x$enable_apps" != "xno"])

Expand Down
2 changes: 1 addition & 1 deletion src/unpack_dsd.c
Expand Up @@ -241,7 +241,7 @@ static int decode_fast (WavpackStream *wps, int32_t *output, int sample_count)
if (index >= wps->dsd.summed_probabilities [wps->dsd.p0] [255])
return 0;

if (*output++ = code = wps->dsd.value_lookup [wps->dsd.p0] [index])
if ((*output++ = code = wps->dsd.value_lookup [wps->dsd.p0] [index]))
wps->dsd.low += wps->dsd.summed_probabilities [wps->dsd.p0] [code-1] * mult;

wps->dsd.high = wps->dsd.low + wps->dsd.probabilities [wps->dsd.p0] [code] * mult - 1;
Expand Down

0 comments on commit 0b9d3a4

Please sign in to comment.