the output image instead of gpix/ppix.
https://rt.cpan.org/Ticket/Display.html?id=83478
+ - eliminate various GCC warnings, mostly initialized but otherwise
+ unused variables.
+
Imager 0.96 - 19 May 2013
===========
output image instead of gpix/ppix.
https://rt.cpan.org/Ticket/Display.html?id=83478
+ - eliminate some initialized but otherwise unused variables detected
+ by GCC.
+
Imager-Font-FT2 0.91
====================
i_ft2_bbox_r(FT2_Fonthandle *handle, double cheight, double cwidth,
char const *text, size_t len, int vlayout, int utf8, i_img_dim *bbox) {
FT_Error error;
- i_img_dim width;
int index;
int first;
i_img_dim ascent = 0, descent = 0;
}
first = 1;
- width = 0;
while (len) {
unsigned long c;
if (utf8) {
int aa, int vlayout, int utf8) {
i_img_dim bbox[8];
i_img *work;
- i_color cl, cl2;
- int x, y;
+ i_color cl;
+ int y;
unsigned char *bmp;
mm_log((1, "i_ft2_cp(handle %p, im %p, (tx, ty) (" i_DFp "), channel %d, cheight %f, cwidth %f, text %p, len %u, align %d, aa %d, vlayout %d, utf8 %d)\n",
+Imager-File-GIF 0.88
+====================
+
+ - eliminate various set but otherwise unused variables caught by GCC.
+
Imager-File-GIF 0.87
====================
use vars qw($VERSION @ISA);
BEGIN {
- $VERSION = "0.87";
+ $VERSION = "0.88";
require XSLoader;
XSLoader::load('Imager::File::GIF', $VERSION);
i_readgif_low(GifFileType *GifFile, int **colour_table, int *colours) {
i_img *im;
int i, j, Size, Row, Col, Width, Height, ExtCode, Count, x;
- int cmapcnt = 0, ImageNum = 0, BackGround = 0, ColorMapSize = 0;
+ int cmapcnt = 0, ImageNum = 0;
ColorMapObject *ColorMap;
GifRecordType RecordType;
*/
if (colour_table) *colour_table = NULL;
- BackGround = GifFile->SBackGroundColor;
ColorMap = (GifFile->Image.ColorMap ? GifFile->Image.ColorMap : GifFile->SColorMap);
if (ColorMap) {
- ColorMapSize = ColorMap->ColorCount;
i_colortable_copy(colour_table, colours, ColorMap);
cmapcnt++;
}
if (( ColorMap = (GifFile->Image.ColorMap ? GifFile->Image.ColorMap : GifFile->SColorMap) )) {
mm_log((1, "Adding local colormap\n"));
- ColorMapSize = ColorMap->ColorCount;
if ( cmapcnt == 0) {
i_colortable_copy(colour_table, colours, ColorMap);
cmapcnt++;
i_readgif_multi_low(GifFileType *GifFile, int *count, int page) {
i_img *img;
int i, j, Size, Width, Height, ExtCode, Count;
- int ImageNum = 0, BackGround = 0, ColorMapSize = 0;
+ int ImageNum = 0, ColorMapSize = 0;
ColorMapObject *ColorMap;
GifRecordType RecordType;
mm_log((1,"i_readgif_multi_low(GifFile %p, , count %p)\n", GifFile, count));
- BackGround = GifFile->SBackGroundColor;
-
Size = GifFile->SWidth * sizeof(GifPixelType);
GifRow = (GifRowType) mymalloc(Size);
if (SvOK(cbd->closecb)) {
dSP;
I32 count;
- SV *sv;
ENTER;
SAVETMPS;
SPAGAIN;
- sv = POPs;
- success = SvTRUE(sv);
+ if (count) {
+ SV *sv = POPs;
+ success = SvTRUE(sv);
+ }
+ else
+ success = 0;
PUTBACK;
FREETMPS;
SV *readcb;
SV *seekcb;
SV *closecb;
- int maxwrite;
CODE:
RETVAL = do_io_new_cb(aTHX_ writecb, readcb, seekcb, closecb);
OUTPUT:
AV *pmaps_av
PREINIT:
unsigned int mask = 0;
- AV *avmain;
AV *avsub;
SV **temp;
int len;
https://rt.cpan.org/Ticket/Display.html?id=74540
+ - eliminate some warnings produced by GCC 4.7.2:
+
+ - a set but otherwise unused variable,
+
+ - an incompletely bracketed array of structures initialization, and
+
+ - a format string error (with no security implications)
+
Imager-File-TIFF 0.87
=====================
static struct tag_name
sample_format_values[] =
{
- "uint", SAMPLEFORMAT_UINT,
- "int", SAMPLEFORMAT_INT,
- "ieeefp", SAMPLEFORMAT_IEEEFP,
- "undefined", SAMPLEFORMAT_VOID,
+ { "uint", SAMPLEFORMAT_UINT },
+ { "int", SAMPLEFORMAT_INT },
+ { "ieeefp", SAMPLEFORMAT_IEEEFP },
+ { "undefined", SAMPLEFORMAT_VOID },
};
static const int sample_format_value_count =
i_img *im;
uint32 width, height;
uint16 samples_per_pixel;
- int tiled, error;
+ int tiled;
float xres, yres;
uint16 resunit;
int gotXres, gotYres;
i_img_dim total_pixels;
int samples_integral;
- error = 0;
-
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height);
TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &samples_per_pixel);
TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rc);
mm_log((1, "i_writetiff_wiol_faxable: TIFFGetField rowsperstrip=%d\n", rowsperstrip));
- mm_log((1, "i_writetiff_wiol_faxable: TIFFGetField scanlinesize=%d\n", TIFFScanlineSize(tif) ));
+ mm_log((1, "i_writetiff_wiol_faxable: TIFFGetField scanlinesize=%lu\n",
+ (unsigned long)TIFFScanlineSize(tif) ));
mm_log((1, "i_writetiff_wiol_faxable: TIFFGetField planarconfig=%d == %d\n", rc, PLANARCONFIG_CONTIG));
if (!TIFFSetField(tif, TIFFTAG_XRESOLUTION, (float)204))
static int
llist_llink_push(struct llist *lst, struct llink *lnk, const void *data) {
- int multip;
- multip = lst->multip;
-
/* fprintf(stderr,"llist_llink_push: data=0x%08X -> 0x%08X\n",data,*(int*)data);
fprintf(stderr,"ssize = %d, multip = %d, fill = %d\n",lst->ssize,lst->multip,lnk->fill); */
if (lnk->fill == lst->multip) return 1;
static void
i_arc_minmax(i_int_hlines *hlines,i_img_dim x,i_img_dim y, double rad,float d1,float d2) {
i_mmarray dot;
- double f,fx,fy;
+ double f;
i_img_dim x1,y1;
i_mmarray_cr(&dot, hlines->limit_y);
x1=(i_img_dim)(x+0.5+rad*cos(d1*PI/180.0));
y1=(i_img_dim)(y+0.5+rad*sin(d1*PI/180.0));
- fx=(float)x1; fy=(float)y1;
/* printf("x1: %d.\ny1: %d.\n",x1,y1); */
i_arcdraw(x, y, x1, y1, &dot);
i_color *Is) {
i_img new_im;
- int inflight;
i_img_dim x, y;
int ch;
i_img_dim mx, Mx, my, My;
L.z = -Lz;
normalize(&L);
} else { /* Light is the position of the light source */
- inflight = 0;
L.x = -0.2;
L.y = -0.4;
L.z = 1;
i_fcolor *line = NULL;
i_fcolor *work = NULL;
size_t line_bytes;
- i_fountain_seg *my_segs;
i_fill_combine_f combine_func = NULL;
i_fill_combinef_f combinef_func = NULL;
dIMCTXim(im);
fount_init_state(&state, xa, ya, xb, yb, type, repeat, combine,
super_sample, ssample_param, count, segs);
- my_segs = state.segs;
for (y = 0; y < im->ysize; ++y) {
i_glinf(im, 0, im->xsize, y, line);
got_one = f->state.ssfunc(&c, x, y, &f->state);
else
got_one = fount_getat(&c, x, y, &f->state);
-
- *data++ = c;
+
+ if (got_one)
+ *data++ = c;
++x;
}
if ( !smooth ) TT_Get_Glyph_Bitmap( glyph, bit, x_off * 64, y_off * 64);
else {
- TT_F26Dot6 xmin, ymin, xmax, ymax;
+ TT_F26Dot6 xmin, ymin;
xmin = gmetrics->bbox.xMin & -64;
ymin = gmetrics->bbox.yMin & -64;
- xmax = (gmetrics->bbox.xMax + 63) & -64;
- ymax = (gmetrics->bbox.yMax + 63) & -64;
i_tt_clear_raster_map( small_bit );
TT_Get_Glyph_Pixmap( glyph, small_bit, -xmin, -ymin );
int rightb = 0;
unsigned long j;
- unsigned char *ustr;
- ustr=(unsigned char*)txt;
mm_log((1,"i_tt_box_inst(handle %p,inst %d,txt '%.*s', len %ld, utf8 %d)\n",
handle, inst, (int)len, txt, (long)len, utf8));
i_img_dim mx,my;
i_img_dim fx,fy;
i_img_dim x,y;
- int ch,c;
+ int ch;
i_img *new_img,*new_img2;
i_color val1,val2,dval1,dval2;
dIMCTXim(im);
new_img=i_img_empty_ch(NULL,fx*2,fy*2,im->channels);
new_img2=i_img_empty_ch(NULL,fx*2,fy*2,im->channels);
- c=0;
for(y=0;y<my;y++) for(x=0;x<fx;x++) {
i_gpix(im,x*2,y,&val1);
i_gpix(im,x*2+1,y,&val2);
size_t
io_slurp(io_glue *ig, unsigned char **c) {
ssize_t rc;
- off_t orgoff;
io_ex_bchain *ieb;
unsigned char *cc;
io_type inn = ig->type;
ieb = ig->exdata;
cc = *c = mymalloc( ieb->length );
- orgoff = ieb->gpos;
-
bufchain_seek(ig, 0, SEEK_SET);
rc = bufchain_read(ig, cc, ieb->length);
void
i_copyto(i_img *im, i_img *src, i_img_dim x1, i_img_dim y1, i_img_dim x2, i_img_dim y2, i_img_dim tx, i_img_dim ty) {
- i_img_dim y, t, ttx, tty;
+ i_img_dim y, t, tty;
if (x2<x1) { t=x1; x1=x2; x2=t; }
if (y2<y1) { t=y1; y1=y2; y2=t; }
IM_COLOR *row = mymalloc(sizeof(IM_COLOR) * (x2-x1));
tty = ty;
for(y=y1; y<y2; y++) {
- ttx = tx;
IM_GLIN(src, x1, x2, y, row);
if (src->channels != im->channels)
IM_ADAPT_COLORS(im->channels, src->channels, row, x2-x1);
i_img* im;
int type;
int width, height, maxval, channels;
- int rounder;
int c;
i_clear_error();
return NULL;
}
} else maxval=1;
- rounder = maxval / 2;
if ((c = i_io_getc(ig)) == EOF || !misspace(c)) {
i_push_error(0, "garbage in header, invalid PNM file");
pcord lminx, lmaxx; /* left line min/max within y bounds in fine coords */
pcord rminx, rmaxx; /* right line min/max within y bounds in fine coords */
i_img_dim cpix; /* x-coordinate of current pixel */
- int thin; /* boolean for thin/thick segment */
i_img_dim startpix; /* temporary variable for "start of this interval" */
i_img_dim stoppix; /* temporary variable for "end of this interval" */
rminx = i_min( p_eval_aty(r, maxy), p_eval_aty(r, miny) );
rmaxx = i_max( p_eval_aty(r, maxy), p_eval_aty(r, miny) );
- thin = coarse(lmaxx) >= coarse(rminx);
-
startpix = i_max( coarse(lminx), 0 );
stoppix = i_min( coarse(rmaxx-1), ss->linelen-1 );
void
cr_hashindex(cvec clr[256],int cnum,hashbox hb[512]) {
- int bx,mind,cd,cumcnt,bst_idx,i;
+ int bx,mind,cd,cumcnt,i;
/* printf("indexing... \n");*/
cumcnt=0;
mind=196608;
for(i=0; i<cnum; i++) {
cd = maxdist(bx,&clr[i]);
- if (cd < mind) { mind=cd; bst_idx=i; }
+ if (cd < mind) { mind=cd; }
}
hb[bx].cnt=0;
/* don't interpolate for a palette based image */
i_palidx *vals = mymalloc(xsize * sizeof(i_palidx));
i_palidx back = 0;
- i_color min;
int minval = 256 * 4;
i_img_dim ix, iy;
i_color want_back;
}
if (tempval < minval) {
back = i;
- min = temp;
minval = tempval;
}
}
i_img_dim tx, i_img_dim ty,
i_img_dim src_minx, i_img_dim src_miny,
i_img_dim src_maxx, i_img_dim src_maxy) {
- i_img_dim x, y, ttx, tty;
+ i_img_dim x, y, tty;
int alphachan;
int ch;
i_img_dim width = src_maxx - src_minx;
for(y = src_miny; y < src_maxy; y++) {
IM_COLOR *srcp = src_line;
IM_COLOR *destp = dest_line;
- ttx = tx;
IM_GLIN(src, src_minx, src_maxx, y, src_line);
IM_GLIN(im, tx, tx + width, tty, dest_line);
if (src->channels != want_channels)