Fix compile errors
[geeqie.git] / src / image_load_jpeg.c
index a496111..2bb27a8 100644 (file)
@@ -96,7 +96,8 @@ static void
 convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
                     guchar **lines)
 {
-       gint i, j;
+       gint i;
+       guint j;
 
        g_return_if_fail (cinfo != NULL);
        g_return_if_fail (cinfo->output_components == 4);
@@ -220,7 +221,7 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
 {
        struct jpeg_source_mgr* src = (struct jpeg_source_mgr*) cinfo->src;
 
-       if (num_bytes > src->bytes_in_buffer)
+       if ((gulong)num_bytes > src->bytes_in_buffer)
                {
                ERREXIT(cinfo, JERR_INPUT_EOF);
                }
@@ -266,6 +267,7 @@ static gboolean image_loader_jpeg_load (gpointer loader, const guchar *buf, gsiz
        struct error_handler_data jerr;
 
        lj->stereo = FALSE;
+//     DEBUG_1("TG: JPG requested size w=%d:h=%d", lj->requested_width > 0, lj->requested_height);
 
        MPOData *mpo = jpeg_get_mpo_data(buf, count);
        if (mpo && mpo->num_images > 1)
@@ -346,6 +348,7 @@ static gboolean image_loader_jpeg_load (gpointer loader, const guchar *buf, gsiz
 
        lj->requested_width = lj->stereo ? cinfo.image_width * 2: cinfo.image_width;
        lj->requested_height = cinfo.image_height;
+//     DEBUG_1("TG: JPG requested size v2 w=%d:h=%d", lj->requested_width > 0, lj->requested_height);
        lj->size_cb(loader, lj->requested_width, lj->requested_height, lj->data);
 
        cinfo.scale_num = 1;