size -= cbd->used - cbd->where;
out += cbd->used - cbd->where;
if (size < sizeof(cbd->buffer)) {
- int did_read;
+ int did_read = 0;
int copy_size;
while (size
&& (did_read = call_reader(cbd, cbd->buffer, size,
PREINIT:
i_palidx *work;
int i;
- STRLEN len;
- int count;
CODE:
if (items > 3) {
work = mymalloc(sizeof(i_palidx) * (items-3));
SV *data
PREINIT:
i_palidx const *work;
- int i;
STRLEN len;
- int count;
CODE:
work = (i_palidx const *)SvPV(data, len);
len /= sizeof(i_palidx);
}
if (handle->load_cond) {
- i_push_errorf(rc, "error loading names (%d)", handle->load_cond);
+ i_push_errorf(handle->load_cond, "error loading names (%d)", handle->load_cond);
return 0;
}
i_color *vals;
int x, y;
int i, ch;
- int minset = -1, maxset;
+ int minset = -1, maxset = 0;
mm_log((1,"i_map(im %p, maps %p, chmask %u)\n", im, maps, mask));
(maxx-p_eval_aty(line, miny))*(p_eval_atx(line, maxx)-miny)/2.0;
return r;
}
+
+ return 0; /* silence compiler warning */
}
i_poly_aa_low(i_img *im, int l, const double *x, const double *y, void const *ctx, scanline_flusher flusher) {
int i ,k; /* Index variables */
int clc; /* Lines inside current interval */
- pcord tempy;
- int cscl; /* Current scanline */
+ /* initialize to avoid compiler warnings */
+ pcord tempy = 0;
+ int cscl = 0; /* Current scanline */
ss_scanline templine; /* scanline accumulator */
p_point *pset; /* List of points in polygon */
color_count = 1;
while (color_count < quant->mc_size) {
- int max_index, max_ch; /* index/channel with biggest spread */
+ /* initialized to avoid compiler warnings */
+ int max_index = 0, max_ch = 0; /* index/channel with biggest spread */
int max_size;
medcut_partition *workpart;
int cum_total;
#endif
static void translate_addi(i_quantize *quant, i_img *img, i_palidx *out) {
- int x, y, i, k, bst_idx;
+ int x, y, i, k, bst_idx = 0;
i_color val;
int pixdev = quant->perturb;
CF_VARS;
int errw;
int difftotal;
int x, y, dx, dy;
- int bst_idx;
+ int bst_idx = 0;
CF_VARS;
if ((quant->errdiff & ed_mask) == ed_custom) {
sx = (x * matrix[0] + y * matrix[1] + matrix[2]) / sz;
sy = (x * matrix[3] + y * matrix[4] + matrix[5]) / sz;
}
+ else {
+ sx = sy = 0;
+ }
/* anything outside these ranges is either a broken co-ordinate
or outside the source */
mapped = 0;
channels = 1;
break;
+ default:
+ i_push_error(0, "invalid or unsupported datatype code");
+ return NULL;
}
if (!i_int_check_image_file_limits(width, height, channels,