Fix compile errors in code copied from other image loaders
convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
guchar **lines)
{
convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
guchar **lines)
{
g_return_if_fail (cinfo != NULL);
g_return_if_fail (cinfo->output_components == 4);
g_return_if_fail (cinfo != NULL);
g_return_if_fail (cinfo->output_components == 4);
{
struct jpeg_source_mgr* src = (struct jpeg_source_mgr*) cinfo->src;
{
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);
}
{
ERREXIT(cinfo, JERR_INPUT_EOF);
}
*/
gboolean found = FALSE;
gint i;
*/
gboolean found = FALSE;
gint i;
n = 0;
while (n < count - 4 && !found)
n = 0;
while (n < count - 4 && !found)
{
OPJ_SIZE_T n = psrc->len;
{
OPJ_SIZE_T n = psrc->len;
n = len;
psrc->cur = psrc->buf + n;
n = len;
psrc->cur = psrc->buf + n;
convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
guchar **lines)
{
convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
guchar **lines)
{
g_return_if_fail (cinfo != NULL);
g_return_if_fail (cinfo->output_components == 4);
g_return_if_fail (cinfo != NULL);
g_return_if_fail (cinfo->output_components == 4);
{
struct jpeg_source_mgr* src = (struct jpeg_source_mgr*) cinfo->src;
{
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);
}
{
ERREXIT(cinfo, JERR_INPUT_EOF);
}
guint* size,
guint bytes_needed)
{
guint* size,
guint bytes_needed)
{
- gint how_many = bytes_needed - *bytes_read;
+ guint how_many = bytes_needed - *bytes_read;
if (how_many > *size) {
how_many = *size;
}
if (how_many > *size) {
how_many = *size;
}
{
ImageLoaderPSD *ld = (ImageLoaderPSD *) loader;
PsdContext* ctx = g_new0(PsdContext, 1);
{
ImageLoaderPSD *ld = (ImageLoaderPSD *) loader;
PsdContext* ctx = g_new0(PsdContext, 1);
guint size = count;
ctx->state = PSD_STATE_HEADER;
guint size = count;
ctx->state = PSD_STATE_HEADER;