diff --git a/camlibs/ax203/ax203_decode_yuv_delta.c b/camlibs/ax203/ax203_decode_yuv_delta.c index 1006b54f4..43779cef6 100644 --- a/camlibs/ax203/ax203_decode_yuv_delta.c +++ b/camlibs/ax203/ax203_decode_yuv_delta.c @@ -43,6 +43,7 @@ #define CLAMP_U8(x) (((x) > 255) ? 255 : (((x) < 0) ? 0 : (x))) +#ifdef HAVE_LIBGD static const int corr_tables[4][8] = { /* Table 0 depends on wrap around to get negative corrections!! */ @@ -52,7 +53,6 @@ static const int corr_tables[4][8] = { { 0, 4, 8, 12, -16, -12, -8, -4 }, }; -#ifdef HAVE_LIBGD /* With in a compressed 4x4 block, the data is stored 4 component values at a time, compressed into 2 bytes, the first 5 bits are a starting value, then 2 bits encoding which correction/delta table to use and diff --git a/camlibs/pentax/pslr.c b/camlibs/pentax/pslr.c index 8e072251e..f2b39583f 100644 --- a/camlibs/pentax/pslr.c +++ b/camlibs/pentax/pslr.c @@ -982,7 +982,7 @@ int pslr_set_exposure_mode(pslr_handle_t h, pslr_exposure_mode_t mode) { } if ( p->model->need_exposure_mode_conversion ) { - mode = exposure_mode_conversion( mode ); + mode = (pslr_exposure_mode_t)exposure_mode_conversion( mode ); } return ipslr_handle_command_x18( p, true, X18_EXPOSURE_MODE, 2, 1, mode, 0); diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c index d732aed8d..7b4d94d90 100644 --- a/camlibs/ptp2/ptp.c +++ b/camlibs/ptp2/ptp.c @@ -412,7 +412,7 @@ fd_putfunc(PTPParams* params, void* private, PTPFDHandlerPrivate* priv = (PTPFDHandlerPrivate*)private; written = write (priv->fd, data, sendlen); - if (written != sendlen) + if ((unsigned long)written != sendlen) return PTP_ERROR_IO; return PTP_RC_OK; } diff --git a/camlibs/quicktake1x0/qtkn-decoder.c b/camlibs/quicktake1x0/qtkn-decoder.c index fe7f98406..1512a96e3 100644 --- a/camlibs/quicktake1x0/qtkn-decoder.c +++ b/camlibs/quicktake1x0/qtkn-decoder.c @@ -112,7 +112,7 @@ int qtkn_decode(unsigned char *raw, int width, int height, unsigned char **out) for (c=0; c < 3; c++) { val = ((0x1000000/last[c] + 0x7ff) >> 12) * mul[c]; s = val > 65564 ? 10:12; - x = ~(-1 << (s-1)); + x = ~((unsigned int)-1 << (s-1)); val <<= 12-s; for (i=0; i < (int)(sizeof(buf[0])/sizeof(short)); i++) { ((short *)buf[c])[i] = (((short *)buf[c])[i] * val + x) >> s; diff --git a/camlibs/tp6801/library.c b/camlibs/tp6801/library.c index 69e102423..0f66eb2c6 100644 --- a/camlibs/tp6801/library.c +++ b/camlibs/tp6801/library.c @@ -151,9 +151,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context) { Camera *camera = data; - int idx, size; + int idx; #ifdef HAVE_LIBGD - int ret; + int ret, size; gdImagePtr im; void *gdpng; #endif