Fix some clang complaints
This commit is contained in:
parent
5300f19575
commit
74dae151cd
|
@ -91,14 +91,14 @@ image_load_mem(const char *file, int *perr)
|
|||
else
|
||||
ext = file;
|
||||
|
||||
err = stat(file, &st);
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
im = NULL;
|
||||
fd = -1;
|
||||
fdata = MAP_FAILED;
|
||||
|
||||
err = stat(file, &st);
|
||||
if (err)
|
||||
goto bail;
|
||||
|
||||
fd = open(file, O_RDONLY);
|
||||
if (fd < 0)
|
||||
goto bail;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "span.h"
|
||||
|
||||
ImlibPoly *
|
||||
__imlib_polygon_new()
|
||||
__imlib_polygon_new(void)
|
||||
{
|
||||
ImlibPoly *poly;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ __imlib_LoadFilter(char *file)
|
|||
}
|
||||
|
||||
void
|
||||
__imlib_dynamic_filters_init()
|
||||
__imlib_dynamic_filters_init(void)
|
||||
{
|
||||
char **list;
|
||||
int num_filters, i = 0;
|
||||
|
@ -116,7 +116,7 @@ __imlib_dynamic_filters_init()
|
|||
}
|
||||
|
||||
void
|
||||
__imlib_dynamic_filters_deinit()
|
||||
__imlib_dynamic_filters_deinit(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ init(ImlibFilterInfo * info)
|
|||
}
|
||||
|
||||
void
|
||||
deinit()
|
||||
deinit(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ init(ImlibFilterInfo * info)
|
|||
}
|
||||
|
||||
void
|
||||
deinit()
|
||||
deinit(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ typedef struct __PACKED__ {
|
|||
png_fctl_t fctl;
|
||||
png_fdat_t fdat;
|
||||
};
|
||||
uint32_t crc; // Misplaced - just indication
|
||||
// uint32_t crc; // Misplaced - just indication
|
||||
} png_chunk_t;
|
||||
|
||||
typedef struct {
|
||||
|
@ -284,7 +284,6 @@ _load(ImlibImage * im, int load_data)
|
|||
png_structp png_ptr = NULL;
|
||||
png_infop info_ptr = NULL;
|
||||
ctx_t ctx = { 0 };
|
||||
int ic;
|
||||
unsigned char *fptr;
|
||||
const png_chunk_t *chunk;
|
||||
const png_fctl_t *pfctl;
|
||||
|
@ -339,13 +338,16 @@ _load(ImlibImage * im, int load_data)
|
|||
fptr = (unsigned char *)im->fi->fdata;
|
||||
fptr += _PNG_SIG_SIZE;
|
||||
seen_actl = false;
|
||||
#ifdef IMLIB2_DEBUG
|
||||
int ic = 0;
|
||||
#endif
|
||||
|
||||
for (ic = 0;; ic++, fptr += 8 + len + 4)
|
||||
for (;; fptr += 8 + len + 4)
|
||||
{
|
||||
chunk = PCAST(const png_chunk_t *, fptr);
|
||||
|
||||
len = htonl(chunk->hdr.len);
|
||||
D("Scan %3d: %06lx: %6d: %.4s: ", ic,
|
||||
D("Scan %3d: %06lx: %6d: %.4s: ", ic++,
|
||||
fptr - (unsigned char *)im->fi->fdata, len, chunk->hdr.name);
|
||||
if (!mm_check(fptr + len))
|
||||
break;
|
||||
|
@ -428,13 +430,16 @@ _load(ImlibImage * im, int load_data)
|
|||
png_process_data(png_ptr, info_ptr, fptr, _PNG_SIG_SIZE);
|
||||
|
||||
fptr += _PNG_SIG_SIZE;
|
||||
#ifdef IMLIB2_DEBUG
|
||||
ic = 0;
|
||||
#endif
|
||||
|
||||
for (ic = 0;; ic++, fptr += 8 + len + 4)
|
||||
for (;; fptr += 8 + len + 4)
|
||||
{
|
||||
chunk = PCAST(const png_chunk_t *, fptr);
|
||||
|
||||
len = htonl(chunk->hdr.len);
|
||||
D("Chunk %3d: %06lx: %6d: %.4s: ", ic,
|
||||
D("Chunk %3d: %06lx: %6d: %.4s: ", ic++,
|
||||
fptr - (unsigned char *)im->fi->fdata, len, chunk->hdr.name);
|
||||
if (!mm_check(fptr + len))
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue