From 33747551bf9a6328c49a9ad945e5a2a69af34f65 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 10 Feb 2014 18:12:17 +0000 Subject: [PATCH] uppsrc: Fixed all -Wall warnings (except logical parenthesis and misplaced else) git-svn-id: svn://ultimatepp.org/upp/trunk@6902 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Util.cpp | 2 +- uppsrc/Core/XML.cpp | 1 - uppsrc/CtrlCore/GtkDrawText.cpp | 1 - uppsrc/Draw/DDARasterizer.h | 2 +- uppsrc/Geom/Coords/coords.cpp | 2 +- uppsrc/Geom/Coords/method.cpp | 8 +- uppsrc/Geom/Coords/util.cpp | 12 +-- uppsrc/Geom/delaunay.cpp | 2 +- uppsrc/Geom/geometry.cpp | 2 +- uppsrc/Geom/linsolv.cpp | 2 +- uppsrc/Geom/polyalg.cpp | 3 +- uppsrc/Geom/vecalg.cpp | 14 ++-- uppsrc/RichText/EncodeQtf.cpp | 1 - uppsrc/Sql/sch_schema.h | 14 ++++ uppsrc/plugin/dbf/dbf.cpp | 6 +- uppsrc/plugin/jpg/lib/jcdiffct.c | 2 +- uppsrc/plugin/jpg/lib/jclhuff.c | 2 +- uppsrc/plugin/jpg/lib/jcmainct.c | 60 ++++++------- uppsrc/plugin/jpg/lib/jcmaster.c | 2 +- uppsrc/plugin/jpg/lib/jcpred.c | 10 ++- uppsrc/plugin/jpg/lib/jcscale.c | 2 +- uppsrc/plugin/jpg/lib/jdcoefct.c | 2 +- uppsrc/plugin/jpg/lib/jddiffct.c | 2 +- uppsrc/plugin/jpg/lib/jdmainct.c | 126 ++++++++++++++-------------- uppsrc/plugin/jpg/lib/jdpred.c | 3 +- uppsrc/plugin/tif/lib/tif_dirread.c | 6 +- uppsrc/plugin/tif/lib/tif_print.c | 2 +- uppsrc/plugin/tif/tifupp.cpp | 23 ++--- uppsrc/plugin/zip/UnZip.cpp | 5 +- 29 files changed, 167 insertions(+), 152 deletions(-) diff --git a/uppsrc/Core/Util.cpp b/uppsrc/Core/Util.cpp index d42370b3f..a5fef0477 100644 --- a/uppsrc/Core/Util.cpp +++ b/uppsrc/Core/Util.cpp @@ -928,7 +928,7 @@ dword NanoStrings::Add(const String& s) } } - if(over.GetCount() >= 0xc0000000) + if(over.GetCount() >= 0x70000000) Panic("NanoStrings: Out of addressing space"); dword ws = 0xc0000000 | over.GetCount(); over.Add(s).Shrink(); diff --git a/uppsrc/Core/XML.cpp b/uppsrc/Core/XML.cpp index 98955fbf5..432cd9ace 100644 --- a/uppsrc/Core/XML.cpp +++ b/uppsrc/Core/XML.cpp @@ -99,7 +99,6 @@ String XmlTag::operator()(const char *text) { StringBuffer r; r << tag << ">"; - int fbi = r.GetCount(); const char *s = text; bool wastag = true; bool wasslash = true; diff --git a/uppsrc/CtrlCore/GtkDrawText.cpp b/uppsrc/CtrlCore/GtkDrawText.cpp index 0a5a32b6b..ec444cb28 100644 --- a/uppsrc/CtrlCore/GtkDrawText.cpp +++ b/uppsrc/CtrlCore/GtkDrawText.cpp @@ -31,7 +31,6 @@ void FontSysData::Init(Font font, int angle) cairo_matrix_init_identity(ctm); cairo_matrix_init_scale(font_matrix, font.GetHeight(), font.GetHeight()); - FT_Face ft = FTFace(font); if(font.IsItalic() && !(FTFace(font)->style_flags & FT_STYLE_FLAG_ITALIC)) { cairo_matrix_t sheer[1]; cairo_matrix_init_identity(sheer); diff --git a/uppsrc/Draw/DDARasterizer.h b/uppsrc/Draw/DDARasterizer.h index 00159728a..a2b6e562c 100644 --- a/uppsrc/Draw/DDARasterizer.h +++ b/uppsrc/Draw/DDARasterizer.h @@ -45,5 +45,5 @@ public: void Cy(int cy_) { cy = cy_; } DDARasterizer(); - ~DDARasterizer(); + virtual ~DDARasterizer(); }; diff --git a/uppsrc/Geom/Coords/coords.cpp b/uppsrc/Geom/Coords/coords.cpp index 41bd39a75..2fc91daa8 100644 --- a/uppsrc/Geom/Coords/coords.cpp +++ b/uppsrc/Geom/Coords/coords.cpp @@ -190,7 +190,7 @@ double GisCoords::Data::ProjectDeviation(Pointf lonlat1, Pointf lonlat2, int bra double GisCoords::Data::ProjectRatio(Pointf lonlat, int branch) const { - Pointf proj = Project(lonlat, branch); + /*Pointf proj = */Project(lonlat, branch); static const double DELTA = 1e-3; Sizef east = Project(lonlat + Sizef(DELTA, 0), branch); Sizef north = Project(lonlat + Sizef(0, DELTA), branch); diff --git a/uppsrc/Geom/Coords/method.cpp b/uppsrc/Geom/Coords/method.cpp index ade0dd93b..a5656b6b2 100644 --- a/uppsrc/Geom/Coords/method.cpp +++ b/uppsrc/Geom/Coords/method.cpp @@ -485,7 +485,7 @@ double ConicalRadiusFunction::Get(double phi) const double ang = phi / 2 + M_PI / 4; double diff = M_PI / 2 - ang; double out; - static double prev = 0; +// static double prev = 0; // bool limit = false; out = (diff <= LAMBERT_LIMDIFF ? diff * (k0 - k1 * diff) : pow(cos(ang) / sin(ang), n)); return out * rho_coef; @@ -524,7 +524,7 @@ GisCoordsUTM::GisCoordsUTM( Pointf GisCoordsUTM::LonLat(Pointf xy) const { - int paspol = ffloor(xy.x / 1000000); +// int paspol = ffloor(xy.x / 1000000); xy.x = xy.x - xmeteroffset; double xyx2 = xy.x * xy.x; double b1 = (xy.y - ymeteroffset) / 111134.861084 * DEGRAD, b = b1; @@ -546,10 +546,10 @@ Pointf GisCoordsUTM::LonLat(Pointf xy) const Pointf GisCoordsUTM::Project(Pointf lonlat, int branch) const { double LL = (lonlat.x - central_meridian) * DEGRAD; - double LL2 = LL * LL, LL3 = LL2 * LL; + double LL2 = LL * LL;//, LL3 = LL2 * LL; lonlat *= DEGRAD; double sx = sin(lonlat.y), cx = cos(lonlat.y); - double cx2 = cx * cx, cx3 = cx2 * cx; + double cx2 = cx * cx;//, cx3 = cx2 * cx; double B = 111134.861084 / DEGRAD * lonlat.y - 16036.480269 * sin(2 * lonlat.y) + 16.828067 * sin(4 * lonlat.y) - 0.021975 * sin(6 * lonlat.y) + 0.000031 * sin(8 * lonlat.y); double T = sx / cx, T2 = T * T; diff --git a/uppsrc/Geom/Coords/util.cpp b/uppsrc/Geom/Coords/util.cpp index 5db852572..b5a814a78 100644 --- a/uppsrc/Geom/Coords/util.cpp +++ b/uppsrc/Geom/Coords/util.cpp @@ -277,7 +277,7 @@ double GisInverse::Get(double y) const else if(ymap[sec] > y && ymap[sec + 1] < y) { double lx = rawxmin + xstep * sec, hx = lx + xstep; - double ly = ymap[sec], hy = ymap[sec + 1]; +// double ly = ymap[sec], hy = ymap[sec + 1]; while(hx - lx > epsilon) { /* double dh = hy - ly, mx, my; @@ -290,12 +290,12 @@ double GisInverse::Get(double y) const if(my > y) { lx = mx; - ly = my; +// ly = my; } else { hx = mx; - hy = my; +// hy = my; } } return (lx + hx) / 2; @@ -367,9 +367,9 @@ String GisInverseTiming(double xmin, double xmax, const GisFunction& fn, int sec do { count++; - double x; +// double x; for(int i = 0; i < 1000; i++) - x = inverse(yval[i]); + /*x = */inverse(yval[i]); } while((duration = msecs(start)) < 500); double nsecs = duration * 1000.0 / double(count); @@ -696,7 +696,7 @@ String GisInterpolatorTiming(double xmin, double xmax, const GisFunction& fn, in String dump = interpolator.CreateDump(xmin, xmax, fn, buckets, sections, samples, check); double dmax = 0; double step_check = (xmax - xmin) / check; - double step_64K = (xmax - xmin) / 65536; +// double step_64K = (xmax - xmin) / 65536; Buffer check_table(1000); for(int c = 0; c < 1000; c++) check_table[c] = xmin + c / 999.0; diff --git a/uppsrc/Geom/delaunay.cpp b/uppsrc/Geom/delaunay.cpp index d0df9b76b..b5e3dab43 100644 --- a/uppsrc/Geom/delaunay.cpp +++ b/uppsrc/Geom/delaunay.cpp @@ -193,7 +193,7 @@ void Delaunay::AddHull(int i) { // collinear, extend fan Triangle& tm = triangles[im]; int in = tm.Next(2); - Triangle& tn = triangles[in]; +// Triangle& tn = triangles[in]; int j = tm[1]; diff --git a/uppsrc/Geom/geometry.cpp b/uppsrc/Geom/geometry.cpp index 7dbaf4992..1648bc05a 100644 --- a/uppsrc/Geom/geometry.cpp +++ b/uppsrc/Geom/geometry.cpp @@ -184,7 +184,7 @@ Matrixf MatrixfMirror(Pointf A, Pointf B) double vx2 = sqr(V.x); double vy2 = sqr(V.y); double det = vx2 + vy2; - double dif = (vx2 - vy2) / det; +// double dif = (vx2 - vy2) / det; double mul = 2 * V.x * V.y / det; Matrixf out(Pointf(vx2 - vy2, mul), Pointf(mul, vy2 - vx2)); out.Fix(A); diff --git a/uppsrc/Geom/linsolv.cpp b/uppsrc/Geom/linsolv.cpp index 132c17d8e..df89d88e6 100644 --- a/uppsrc/Geom/linsolv.cpp +++ b/uppsrc/Geom/linsolv.cpp @@ -83,7 +83,7 @@ Vector LinearSolver::Solve() { Point pivot = pivots[r]; const double *row = Row(pivot.y); - int px = pivot.x; +// int px = pivot.x; double out = row[rows]; // right side for(int s = r; ++s < pivots.GetCount();) { diff --git a/uppsrc/Geom/polyalg.cpp b/uppsrc/Geom/polyalg.cpp index 8cf2187c3..03da3f13b 100644 --- a/uppsrc/Geom/polyalg.cpp +++ b/uppsrc/Geom/polyalg.cpp @@ -5,6 +5,7 @@ NAMESPACE_UPP #define POLY_TIMING(n) // RTIMING(n) #define POLY_LOGGING 0 // 1 = on, 0 = off +/* static bool ContainsPoints(const Point *poly, int count, Point P) { if(count <= 2 || IsNull(P)) @@ -52,7 +53,7 @@ static bool ContainsPoints(const Point *poly, int count, Point P) } return in; } - +*/ static inline int PolyCompare(Pointf P, Pointf A, Pointf B, Size ap, Size bp) { if(ap.cx < 0 && bp.cx < 0 || ap.cy > 0 && bp.cy > 0 || ap.cy < 0 && bp.cy < 0) diff --git a/uppsrc/Geom/vecalg.cpp b/uppsrc/Geom/vecalg.cpp index cb9acc87c..a9e0c51c2 100644 --- a/uppsrc/Geom/vecalg.cpp +++ b/uppsrc/Geom/vecalg.cpp @@ -99,7 +99,7 @@ bool Crosses(const Rectf& R, Pointf A, Pointf B) { 9, 2, 1, 2, 1, 9 }, }; - ax = clue2[ay][ax]; + ax = clue2[(int)ay][(int)ax]; double temp; switch(ax >> 1) @@ -479,7 +479,7 @@ Vector ConvexHullOrder(const Array& points) // VecArcIterator:: VecArcIterator::VecArcIterator(Pointf start, Pointf end, double bulge, Callback1 lineto) - : clip(Null), arc(start, end, bulge), lineto(lineto) + : arc(start, end, bulge), clip(Null), lineto(lineto) { level = DEFAULT_LEVEL; precision = 1; // default precision @@ -488,7 +488,7 @@ VecArcIterator::VecArcIterator(Pointf start, Pointf end, double bulge, Callback1 ////////////////////////////////////////////////////////////////////// VecArcIterator::VecArcIterator(const VecArc& arc, Callback1 lineto) - : clip(Null), arc(arc), lineto(lineto) + : arc(arc), clip(Null), lineto(lineto) { level = DEFAULT_LEVEL; precision = 1; // default precision @@ -887,8 +887,8 @@ Pointf VecArc::GetPointAt(Pointf P, Pointf Q, double l, double h, double t) double beta = 2 * atan(lambda); t = sin((2 * t - 1) * beta) / sin(beta); C += (Q - P) * (t / 2); - double k2 = k * k; - double k4 = k2 * k2; +// double k2 = k * k; +// double k4 = k2 * k2; double l2 = lambda * lambda; double opl = 1 + l2; t *= t; @@ -1018,10 +1018,10 @@ VecArc VecCurve::Segment(int i) const VecArcInfo::VecArcInfo() : C(Null) - , radius(Null) + , bow(Null) , alpha(Null) , beta(Null) - , bow(Null) + , radius(Null) { } diff --git a/uppsrc/RichText/EncodeQtf.cpp b/uppsrc/RichText/EncodeQtf.cpp index e85c34710..e4db584eb 100644 --- a/uppsrc/RichText/EncodeQtf.cpp +++ b/uppsrc/RichText/EncodeQtf.cpp @@ -227,7 +227,6 @@ void QTFEncodePara(String& qtf, const RichPara& p, const RichPara::Format& style String data = object.Write(); const char *q = data.Begin(); const char *slim = data.End(); - int n = 0; qtf.Reserve(8 * data.GetLength() / 7); if(object.IsText()) { qtf << "`"; diff --git a/uppsrc/Sql/sch_schema.h b/uppsrc/Sql/sch_schema.h index 91960cd29..8c084fa59 100644 --- a/uppsrc/Sql/sch_schema.h +++ b/uppsrc/Sql/sch_schema.h @@ -7,9 +7,19 @@ #define ATTRIBUTE(x, d) schema.Attribute(x, d); #define TABLE_SUFFIX(s) schema.TableSuffix(s); +#ifdef __GNUC__ + +#define TYPE(x)\ +static void SCHEMA_##x(SqlSchema& schema) __attribute__((unused)); \ +static void SCHEMA_##x(SqlSchema& schema) { + +#else + #define TYPE(x)\ static void SCHEMA_##x(SqlSchema& schema) { +#endif + #define TYPE_I(x, b1)\ static void SCHEMA_##x(SqlSchema& schema) { SCHEMA_##b1(schema); @@ -45,6 +55,10 @@ void TABLE_##x(SqlSchema& schema) { schema.Table(#x); SCHEMA_##x(schema); schema #define CONFIG(x, d) schema.Config(x, d); #define UPGRADE(x) schema.Upgrade(x); +#ifdef __GNUC__ +static void All_Tables(SqlSchema& schema) __attribute__((unused)); +#endif + static void All_Tables(SqlSchema& schema) { #include SCHEMADIALECT diff --git a/uppsrc/plugin/dbf/dbf.cpp b/uppsrc/plugin/dbf/dbf.cpp index 30b91b947..c2ebe5674 100644 --- a/uppsrc/plugin/dbf/dbf.cpp +++ b/uppsrc/plugin/dbf/dbf.cpp @@ -121,7 +121,7 @@ static int StrBool(char c) } DbfStream::Field::Field(const char *_name, char type, byte width, byte decimal) -: type(type), width(width), decimal(decimal), offset(0) +: offset(0), type(type), width(width), decimal(decimal) { if(_name) { const char *p = reinterpret_cast(memchr(_name, 0, 11)); @@ -462,7 +462,7 @@ bool DbfStream::StreamHeader(bool full) } } if(fpt.IsOpen() && fpt.IsLoading()) { // read FPT header - int nextfree = fpt.Get32be(); + // int nextfree = fpt.Get32be(); fpt_block_size = fpt.Get32be(); if(fpt_block_size <= 0 || fpt_block_size >= 1 << 24) fpt.Close(); // has_memo = false; @@ -958,7 +958,7 @@ Value DbfStream::GetItemMemo(int i, bool binary) const if(pos >= fpt.GetSize()) return Value(); fpt.Seek(pos); - int fieldtype = fpt.Get32be(); + // int fieldtype = fpt.Get32be(); int len = fpt.Get32be(); if(len > 0) { StringBuffer outbuf(len); diff --git a/uppsrc/plugin/jpg/lib/jcdiffct.c b/uppsrc/plugin/jpg/lib/jcdiffct.c index d97d3bec6..2346edf55 100644 --- a/uppsrc/plugin/jpg/lib/jcdiffct.c +++ b/uppsrc/plugin/jpg/lib/jcdiffct.c @@ -145,7 +145,7 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf) c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private; JDIMENSION MCU_col_num; /* index of current MCU within row */ JDIMENSION MCU_count; /* number of MCUs encoded */ - JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; +// JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; int comp, ci, yoffset, samp_row, samp_rows, samps_across; jpeg_component_info *compptr; diff --git a/uppsrc/plugin/jpg/lib/jclhuff.c b/uppsrc/plugin/jpg/lib/jclhuff.c index cd2711aba..850919ab9 100644 --- a/uppsrc/plugin/jpg/lib/jclhuff.c +++ b/uppsrc/plugin/jpg/lib/jclhuff.c @@ -493,7 +493,7 @@ encode_mcus_gather (j_compress_ptr cinfo, JDIFFIMAGE diff_buf, for (sampn = 0; sampn < cinfo->data_units_in_MCU; sampn++) { register int temp; register int nbits; - c_derived_tbl *dctbl = entropy->cur_tbls[sampn]; +// c_derived_tbl *dctbl = entropy->cur_tbls[sampn]; long * counts = entropy->cur_counts[sampn]; /* Encode the difference per section H.1.2.2 */ diff --git a/uppsrc/plugin/jpg/lib/jcmainct.c b/uppsrc/plugin/jpg/lib/jcmainct.c index fdc934ad2..267c89c95 100644 --- a/uppsrc/plugin/jpg/lib/jcmainct.c +++ b/uppsrc/plugin/jpg/lib/jcmainct.c @@ -68,32 +68,32 @@ METHODDEF(void) process_data_buffer_main METHODDEF(void) start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; /* Do nothing in raw-data mode. */ if (cinfo->raw_data_in) return; - main->cur_iMCU_row = 0; /* initialize counters */ - main->rowgroup_ctr = 0; - main->suspended = FALSE; - main->pass_mode = pass_mode; /* save mode for use by process_data */ + main_->cur_iMCU_row = 0; /* initialize counters */ + main_->rowgroup_ctr = 0; + main_->suspended = FALSE; + main_->pass_mode = pass_mode; /* save mode for use by process_data */ switch (pass_mode) { case JBUF_PASS_THRU: #ifdef FULL_MAIN_BUFFER_SUPPORTED - if (main->whole_image[0] != NULL) + if (main_->whole_image[0] != NULL) ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); #endif - main->pub.process_data = process_data_simple_main; + main_->pub.process_data = process_data_simple_main; break; #ifdef FULL_MAIN_BUFFER_SUPPORTED case JBUF_SAVE_SOURCE: case JBUF_CRANK_DEST: case JBUF_SAVE_AND_PASS: - if (main->whole_image[0] == NULL) + if (main_->whole_image[0] == NULL) ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - main->pub.process_data = process_data_buffer_main; + main_->pub.process_data = process_data_buffer_main; break; #endif default: @@ -114,47 +114,47 @@ process_data_simple_main (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail) { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; unsigned data_unit = cinfo->data_unit; - while (main->cur_iMCU_row < cinfo->total_iMCU_rows) { - /* Read input data if we haven't filled the main buffer yet */ - if (main->rowgroup_ctr < data_unit) + while (main_->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Read input data if we haven't filled the main_ buffer yet */ + if (main_->rowgroup_ctr < data_unit) (*cinfo->prep->pre_process_data) (cinfo, input_buf, in_row_ctr, in_rows_avail, - main->buffer, &main->rowgroup_ctr, + main_->buffer, &main_->rowgroup_ctr, (JDIMENSION) data_unit); /* If we don't have a full iMCU row buffered, return to application for * more data. Note that preprocessor will always pad to fill the iMCU row * at the bottom of the image. */ - if (main->rowgroup_ctr != data_unit) + if (main_->rowgroup_ctr != data_unit) return; /* Send the completed row to the compressor */ - if (! (*cinfo->codec->compress_data) (cinfo, main->buffer)) { + if (! (*cinfo->codec->compress_data) (cinfo, main_->buffer)) { /* If compressor did not consume the whole row, then we must need to * suspend processing and return to the application. In this situation * we pretend we didn't yet consume the last input row; otherwise, if * it happened to be the last row of the image, the application would * think we were done. */ - if (! main->suspended) { + if (! main_->suspended) { (*in_row_ctr)--; - main->suspended = TRUE; + main_->suspended = TRUE; } return; } /* We did finish the row. Undo our little suspension hack if a previous - * call suspended; then mark the main buffer empty. + * call suspended; then mark the main_ buffer empty. */ - if (main->suspended) { + if (main_->suspended) { (*in_row_ctr)++; - main->suspended = FALSE; + main_->suspended = FALSE; } - main->rowgroup_ctr = 0; - main->cur_iMCU_row++; + main_->rowgroup_ctr = 0; + main_->cur_iMCU_row++; } } @@ -246,16 +246,16 @@ process_data_buffer_main (j_compress_ptr cinfo, GLOBAL(void) jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) { - my_main_ptr main; + my_main_ptr main_; int ci; jpeg_component_info *compptr; int data_unit = cinfo->data_unit; - main = (my_main_ptr) + main_ = (my_main_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_main_controller)); - cinfo->main = (struct jpeg_c_main_controller *) main; - main->pub.start_pass = start_pass_main; + cinfo->main = (struct jpeg_c_main_controller *) main_; + main_->pub.start_pass = start_pass_main; /* We don't need to create a buffer in raw-data mode. */ if (cinfo->raw_data_in) @@ -270,7 +270,7 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) /* Note we pad the bottom to a multiple of the iMCU height */ for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; ci++, compptr++) { - main->whole_image[ci] = (*cinfo->mem->request_virt_sarray) + main_->whole_image[ci] = (*cinfo->mem->request_virt_sarray) ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, compptr->width_in_data_units * data_unit, (JDIMENSION) jround_up((long) compptr->height_in_data_units, @@ -282,12 +282,12 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) #endif } else { #ifdef FULL_MAIN_BUFFER_SUPPORTED - main->whole_image[0] = NULL; /* flag for no virtual arrays */ + main_->whole_image[0] = NULL; /* flag for no virtual arrays */ #endif /* Allocate a strip buffer for each component */ for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; ci++, compptr++) { - main->buffer[ci] = (*cinfo->mem->alloc_sarray) + main_->buffer[ci] = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, JPOOL_IMAGE, compptr->width_in_data_units * data_unit, (JDIMENSION) (compptr->v_samp_factor * data_unit)); diff --git a/uppsrc/plugin/jpg/lib/jcmaster.c b/uppsrc/plugin/jpg/lib/jcmaster.c index 430b4dabf..bb5fc3bab 100644 --- a/uppsrc/plugin/jpg/lib/jcmaster.c +++ b/uppsrc/plugin/jpg/lib/jcmaster.c @@ -452,7 +452,7 @@ per_scan_setup (j_compress_ptr cinfo) METHODDEF(void) prepare_for_pass (j_compress_ptr cinfo) { - j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; +// j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec; my_master_ptr master = (my_master_ptr) cinfo->master; switch (master->pass_type) { diff --git a/uppsrc/plugin/jpg/lib/jcpred.c b/uppsrc/plugin/jpg/lib/jcpred.c index 1ceceafae..75f70c745 100644 --- a/uppsrc/plugin/jpg/lib/jcpred.c +++ b/uppsrc/plugin/jpg/lib/jcpred.c @@ -80,7 +80,8 @@ METHODDEF(void) start_pass reset_predictor(cinfo, ci); \ restart = TRUE; \ } \ - } + } \ + (void)restart; /* @@ -117,7 +118,8 @@ METHODDEF(void) start_pass if (cinfo->restart_interval) { \ if (--pred->restart_rows_to_go[ci] == 0) \ reset_predictor(cinfo, ci); \ - } + } \ + (void)Rc;(void)Ra; /* @@ -259,8 +261,8 @@ reset_predictor (j_compress_ptr cinfo, int ci) METHODDEF(void) start_pass (j_compress_ptr cinfo) { - j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; - c_pred_ptr pred = (c_pred_ptr) losslsc->pred_private; +// j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; +// c_pred_ptr pred = (c_pred_ptr) losslsc->pred_private; int ci; /* Check that the restart interval is an integer multiple of the number diff --git a/uppsrc/plugin/jpg/lib/jcscale.c b/uppsrc/plugin/jpg/lib/jcscale.c index b14eebfc5..051388bb7 100644 --- a/uppsrc/plugin/jpg/lib/jcscale.c +++ b/uppsrc/plugin/jpg/lib/jcscale.c @@ -20,7 +20,7 @@ METHODDEF(void) simple_downscale(j_compress_ptr cinfo, JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width) { - j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; +// j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; unsigned xindex; for (xindex = 0; xindex < width; xindex++) diff --git a/uppsrc/plugin/jpg/lib/jdcoefct.c b/uppsrc/plugin/jpg/lib/jdcoefct.c index 9bd108aa8..9a7025a5b 100644 --- a/uppsrc/plugin/jpg/lib/jdcoefct.c +++ b/uppsrc/plugin/jpg/lib/jdcoefct.c @@ -120,7 +120,7 @@ start_output_pass (j_decompress_ptr cinfo) { #ifdef BLOCK_SMOOTHING_SUPPORTED j_lossy_d_ptr lossyd = (j_lossy_d_ptr) cinfo->codec; - d_coef_ptr coef = (d_coef_ptr) lossyd->coef_private; +// d_coef_ptr coef = (d_coef_ptr) lossyd->coef_private; /* If multipass, check to see whether to use block smoothing on this pass */ if (lossyd->coef_arrays != NULL) { diff --git a/uppsrc/plugin/jpg/lib/jddiffct.c b/uppsrc/plugin/jpg/lib/jddiffct.c index 1948f7ef1..d9034fd2a 100644 --- a/uppsrc/plugin/jpg/lib/jddiffct.c +++ b/uppsrc/plugin/jpg/lib/jddiffct.c @@ -257,7 +257,7 @@ consume_data (j_decompress_ptr cinfo) d_diff_ptr diff = (d_diff_ptr) losslsd->diff_private; // JDIMENSION MCU_col_num; /* index of current MCU within row */ // JDIMENSION MCU_count; /* number of MCUs decoded */ - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; +// JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; int comp, ci; //, yoffset, row, prev_row; JSAMPARRAY buffer[MAX_COMPS_IN_SCAN]; jpeg_component_info *compptr; diff --git a/uppsrc/plugin/jpg/lib/jdmainct.c b/uppsrc/plugin/jpg/lib/jdmainct.c index 365799876..c3daa47aa 100644 --- a/uppsrc/plugin/jpg/lib/jdmainct.c +++ b/uppsrc/plugin/jpg/lib/jdmainct.c @@ -159,7 +159,7 @@ alloc_funny_pointers (j_decompress_ptr cinfo) * This is done only once, not once per pass. */ { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; int ci, rgroup; int M = cinfo->min_codec_data_unit; jpeg_component_info *compptr; @@ -168,10 +168,10 @@ alloc_funny_pointers (j_decompress_ptr cinfo) /* Get top-level space for component array pointers. * We alloc both arrays with one call to save a few cycles. */ - main->xbuffer[0] = (JSAMPIMAGE) + main_->xbuffer[0] = (JSAMPIMAGE) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); - main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components; + main_->xbuffer[1] = main_->xbuffer[0] + cinfo->num_components; for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; ci++, compptr++) { @@ -184,9 +184,9 @@ alloc_funny_pointers (j_decompress_ptr cinfo) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); xbuf += rgroup; /* want one row group at negative offsets */ - main->xbuffer[0][ci] = xbuf; + main_->xbuffer[0][ci] = xbuf; xbuf += rgroup * (M + 4); - main->xbuffer[1][ci] = xbuf; + main_->xbuffer[1][ci] = xbuf; } } @@ -200,7 +200,7 @@ make_funny_pointers (j_decompress_ptr cinfo) * This will be repeated at the beginning of each pass. */ { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; int ci, i, rgroup; int M = cinfo->min_codec_data_unit; jpeg_component_info *compptr; @@ -210,10 +210,10 @@ make_funny_pointers (j_decompress_ptr cinfo) ci++, compptr++) { rgroup = (compptr->v_samp_factor * compptr->codec_data_unit) / cinfo->min_codec_data_unit; /* height of a row group of component */ - xbuf0 = main->xbuffer[0][ci]; - xbuf1 = main->xbuffer[1][ci]; + xbuf0 = main_->xbuffer[0][ci]; + xbuf1 = main_->xbuffer[1][ci]; /* First copy the workspace pointers as-is */ - buf = main->buffer[ci]; + buf = main_->buffer[ci]; for (i = 0; i < rgroup * (M + 2); i++) { xbuf0[i] = xbuf1[i] = buf[i]; } @@ -240,7 +240,7 @@ set_wraparound_pointers (j_decompress_ptr cinfo) * This changes the pointer list state from top-of-image to the normal state. */ { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; int ci, i, rgroup; int M = cinfo->min_codec_data_unit; jpeg_component_info *compptr; @@ -250,8 +250,8 @@ set_wraparound_pointers (j_decompress_ptr cinfo) ci++, compptr++) { rgroup = (compptr->v_samp_factor * compptr->codec_data_unit) / cinfo->min_codec_data_unit; /* height of a row group of component */ - xbuf0 = main->xbuffer[0][ci]; - xbuf1 = main->xbuffer[1][ci]; + xbuf0 = main_->xbuffer[0][ci]; + xbuf1 = main_->xbuffer[1][ci]; for (i = 0; i < rgroup; i++) { xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; @@ -269,7 +269,7 @@ set_bottom_pointers (j_decompress_ptr cinfo) * Also sets rowgroups_avail to indicate number of nondummy row groups in row. */ { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; int ci, i, rgroup, iMCUheight, rows_left; jpeg_component_info *compptr; JSAMPARRAY xbuf; @@ -286,12 +286,12 @@ set_bottom_pointers (j_decompress_ptr cinfo) * so we need only do it once. */ if (ci == 0) { - main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); + main_->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); } /* Duplicate the last real sample row rgroup*2 times; this pads out the * last partial rowgroup and ensures at least one full rowgroup of context. */ - xbuf = main->xbuffer[main->whichptr][ci]; + xbuf = main_->xbuffer[main_->whichptr][ci]; for (i = 0; i < rgroup * 2; i++) { xbuf[rows_left + i] = xbuf[rows_left-1]; } @@ -306,27 +306,27 @@ set_bottom_pointers (j_decompress_ptr cinfo) METHODDEF(void) start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; switch (pass_mode) { case JBUF_PASS_THRU: if (cinfo->upsample->need_context_rows) { - main->pub.process_data = process_data_context_main; + main_->pub.process_data = process_data_context_main; make_funny_pointers(cinfo); /* Create the xbuffer[] lists */ - main->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ - main->context_state = CTX_PREPARE_FOR_IMCU; - main->iMCU_row_ctr = 0; + main_->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ + main_->context_state = CTX_PREPARE_FOR_IMCU; + main_->iMCU_row_ctr = 0; } else { /* Simple case with no context needed */ - main->pub.process_data = process_data_simple_main; + main_->pub.process_data = process_data_simple_main; } - main->buffer_full = FALSE; /* Mark buffer empty */ - main->rowgroup_ctr = 0; + main_->buffer_full = FALSE; /* Mark buffer empty */ + main_->rowgroup_ctr = 0; break; #ifdef QUANT_2PASS_SUPPORTED case JBUF_CRANK_DEST: /* For last pass of 2-pass quantization, just crank the postprocessor */ - main->pub.process_data = process_data_crank_post; + main_->pub.process_data = process_data_crank_post; break; #endif default: @@ -346,14 +346,14 @@ process_data_simple_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; JDIMENSION rowgroups_avail; - /* Read input data if we haven't filled the main buffer yet */ - if (! main->buffer_full) { - if (! (*cinfo->codec->decompress_data) (cinfo, main->buffer)) + /* Read input data if we haven't filled the main_ buffer yet */ + if (! main_->buffer_full) { + if (! (*cinfo->codec->decompress_data) (cinfo, main_->buffer)) return; /* suspension forced, can do nothing more */ - main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + main_->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ } /* There are always min_codec_data_unit row groups in an iMCU row. */ @@ -364,14 +364,14 @@ process_data_simple_main (j_decompress_ptr cinfo, */ /* Feed the postprocessor */ - (*cinfo->post->post_process_data) (cinfo, main->buffer, - &main->rowgroup_ctr, rowgroups_avail, + (*cinfo->post->post_process_data) (cinfo, main_->buffer, + &main_->rowgroup_ctr, rowgroups_avail, output_buf, out_row_ctr, out_rows_avail); /* Has postprocessor consumed all the data yet? If so, mark buffer empty */ - if (main->rowgroup_ctr >= rowgroups_avail) { - main->buffer_full = FALSE; - main->rowgroup_ctr = 0; + if (main_->rowgroup_ctr >= rowgroups_avail) { + main_->buffer_full = FALSE; + main_->rowgroup_ctr = 0; } } @@ -386,15 +386,15 @@ process_data_context_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { - my_main_ptr main = (my_main_ptr) cinfo->main; + my_main_ptr main_ = (my_main_ptr) cinfo->main; - /* Read input data if we haven't filled the main buffer yet */ - if (! main->buffer_full) { + /* Read input data if we haven't filled the main_ buffer yet */ + if (! main_->buffer_full) { if (! (*cinfo->codec->decompress_data) (cinfo, - main->xbuffer[main->whichptr])) + main_->xbuffer[main_->whichptr])) return; /* suspension forced, can do nothing more */ - main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ - main->iMCU_row_ctr++; /* count rows received */ + main_->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + main_->iMCU_row_ctr++; /* count rows received */ } /* Postprocessor typically will not swallow all the input data it is handed @@ -402,47 +402,47 @@ process_data_context_main (j_decompress_ptr cinfo, * to exit and restart. This switch lets us keep track of how far we got. * Note that each case falls through to the next on successful completion. */ - switch (main->context_state) { + switch (main_->context_state) { case CTX_POSTPONED_ROW: /* Call postprocessor using previously set pointers for postponed row */ - (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], - &main->rowgroup_ctr, main->rowgroups_avail, + (*cinfo->post->post_process_data) (cinfo, main_->xbuffer[main_->whichptr], + &main_->rowgroup_ctr, main_->rowgroups_avail, output_buf, out_row_ctr, out_rows_avail); - if (main->rowgroup_ctr < main->rowgroups_avail) + if (main_->rowgroup_ctr < main_->rowgroups_avail) return; /* Need to suspend */ - main->context_state = CTX_PREPARE_FOR_IMCU; + main_->context_state = CTX_PREPARE_FOR_IMCU; if (*out_row_ctr >= out_rows_avail) return; /* Postprocessor exactly filled output buf */ /*FALLTHROUGH*/ case CTX_PREPARE_FOR_IMCU: /* Prepare to process first M-1 row groups of this iMCU row */ - main->rowgroup_ctr = 0; - main->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit - 1); + main_->rowgroup_ctr = 0; + main_->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit - 1); /* Check for bottom of image: if so, tweak pointers to "duplicate" * the last sample row, and adjust rowgroups_avail to ignore padding rows. */ - if (main->iMCU_row_ctr == cinfo->total_iMCU_rows) + if (main_->iMCU_row_ctr == cinfo->total_iMCU_rows) set_bottom_pointers(cinfo); - main->context_state = CTX_PROCESS_IMCU; + main_->context_state = CTX_PROCESS_IMCU; /*FALLTHROUGH*/ case CTX_PROCESS_IMCU: /* Call postprocessor using previously set pointers */ - (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], - &main->rowgroup_ctr, main->rowgroups_avail, + (*cinfo->post->post_process_data) (cinfo, main_->xbuffer[main_->whichptr], + &main_->rowgroup_ctr, main_->rowgroups_avail, output_buf, out_row_ctr, out_rows_avail); - if (main->rowgroup_ctr < main->rowgroups_avail) + if (main_->rowgroup_ctr < main_->rowgroups_avail) return; /* Need to suspend */ /* After the first iMCU, change wraparound pointers to normal state */ - if (main->iMCU_row_ctr == 1) + if (main_->iMCU_row_ctr == 1) set_wraparound_pointers(cinfo); /* Prepare to load new iMCU row using other xbuffer list */ - main->whichptr ^= 1; /* 0=>1 or 1=>0 */ - main->buffer_full = FALSE; + main_->whichptr ^= 1; /* 0=>1 or 1=>0 */ + main_->buffer_full = FALSE; /* Still need to process last row group of this iMCU row, */ /* which is saved at index M+1 of the other xbuffer */ - main->rowgroup_ctr = (JDIMENSION) (cinfo->min_codec_data_unit + 1); - main->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit + 2); - main->context_state = CTX_POSTPONED_ROW; + main_->rowgroup_ctr = (JDIMENSION) (cinfo->min_codec_data_unit + 1); + main_->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit + 2); + main_->context_state = CTX_POSTPONED_ROW; } } @@ -475,15 +475,15 @@ process_data_crank_post (j_decompress_ptr cinfo, GLOBAL(void) jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) { - my_main_ptr main; + my_main_ptr main_; int ci, rgroup, ngroups; jpeg_component_info *compptr; - main = (my_main_ptr) + main_ = (my_main_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_main_controller)); - cinfo->main = (struct jpeg_d_main_controller *) main; - main->pub.start_pass = start_pass_main; + cinfo->main = (struct jpeg_d_main_controller *) main_; + main_->pub.start_pass = start_pass_main; if (need_full_buffer) /* shouldn't happen */ ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); @@ -504,7 +504,7 @@ jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) ci++, compptr++) { rgroup = (compptr->v_samp_factor * compptr->codec_data_unit) / cinfo->min_codec_data_unit; /* height of a row group of component */ - main->buffer[ci] = (*cinfo->mem->alloc_sarray) + main_->buffer[ci] = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, JPOOL_IMAGE, compptr->width_in_data_units * compptr->codec_data_unit, (JDIMENSION) (rgroup * ngroups)); diff --git a/uppsrc/plugin/jpg/lib/jdpred.c b/uppsrc/plugin/jpg/lib/jdpred.c index a6033e148..3b7a51d9f 100644 --- a/uppsrc/plugin/jpg/lib/jdpred.c +++ b/uppsrc/plugin/jpg/lib/jdpred.c @@ -85,7 +85,8 @@ Rb = GETJSAMPLE(prev_row[xindex]); \ Ra = (diff_buf[xindex] + PREDICTOR) & 0xFFFF; \ undiff_buf[xindex] = Ra; \ - } + } \ + (void)Rc; /* diff --git a/uppsrc/plugin/tif/lib/tif_dirread.c b/uppsrc/plugin/tif/lib/tif_dirread.c index 4c03f8b13..6504ee125 100644 --- a/uppsrc/plugin/tif/lib/tif_dirread.c +++ b/uppsrc/plugin/tif/lib/tif_dirread.c @@ -84,7 +84,7 @@ TIFFReadDirectory(TIFF* tif) size_t fix; uint16 dircount; uint16 previous_tag = 0; - int diroutoforderwarning = 0, compressionknown = 0; + int diroutoforderwarning = 0;//, compressionknown = 0; int haveunknowntags = 0; tif->tif_diroff = tif->tif_nextdiroff; @@ -255,8 +255,8 @@ TIFFReadDirectory(TIFF* tif) dp->tdir_type, dp->tdir_offset); if (!TIFFSetField(tif, dp->tdir_tag, (uint16)v)) goto bad; - else - compressionknown = 1; +// else +// compressionknown = 1; break; /* XXX: workaround for broken TIFFs */ } else if (dp->tdir_type == TIFF_LONG) { diff --git a/uppsrc/plugin/tif/lib/tif_print.c b/uppsrc/plugin/tif/lib/tif_print.c index 80b1b4968..7fb301771 100644 --- a/uppsrc/plugin/tif/lib/tif_print.c +++ b/uppsrc/plugin/tif/lib/tif_print.c @@ -115,7 +115,7 @@ static int _TIFFPrettyPrintField(TIFF* tif, FILE* fd, ttag_t tag, uint32 value_count, void *raw_data) { - TIFFDirectory *td = &tif->tif_dir; +// TIFFDirectory *td = &tif->tif_dir; switch (tag) { diff --git a/uppsrc/plugin/tif/tifupp.cpp b/uppsrc/plugin/tif/tifupp.cpp index 745d7151a..f83487cfc 100644 --- a/uppsrc/plugin/tif/tifupp.cpp +++ b/uppsrc/plugin/tif/tifupp.cpp @@ -114,6 +114,7 @@ extern "C" void _TIFFmemset(void* p, int v, tsize_t c) { memset(p, v, extern "C" void _TIFFmemcpy(void* d, const tdata_t s, tsize_t c) { memcpy(d, s, c); } extern "C" int _TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c) { return memcmp(p1, p2, c); } +/* static void Blt2to4(byte *dest, const byte *src, unsigned count) { byte b; @@ -162,7 +163,7 @@ static void Blt2to4(byte *dest, const byte *src, unsigned count) break; } } - +*/ static void BltPack11(byte *dest, const byte *src, byte bit_shift, unsigned count) { if(bit_shift == 0) @@ -406,7 +407,7 @@ static void BltPack44(byte *dest, const byte *src, bool shift, unsigned count) dest[c2] = (dest[c2] & 15) | (src[c2] & 0xF0); } } - +/* static void BltPack4(byte *dest, const byte *src, unsigned count) { #define BLT_PACK_4_4(o) dest[(o)] = src[4 * (o)]; dest[(o) + 1] = src[4 * (o) + 4]; \ @@ -438,7 +439,7 @@ static void BltPack4(byte *dest, const byte *src, unsigned count) if(count & 1) dest[0] = src[0]; } - +*/ static tsize_t ReadStream(thandle_t fd, tdata_t buf, tsize_t size) { Stream *stream = reinterpret_cast(fd); @@ -654,7 +655,7 @@ static void putContig1(TIFFRGBAImage *img, tif_uint32 *cp, tif_int32 fromskew, tif_int32 toskew, byte *pp) { TIFRaster::Data *helper = (TIFRaster::Data *)img; - Size size = helper->size; +// Size size = helper->size; int iw = toskew + w; bool keep_y = (iw >= 0); int x8 = x >> 3; @@ -674,7 +675,7 @@ static void putContig2(TIFFRGBAImage *img, tif_uint32 *cp, tif_int32 fromskew, tif_int32 toskew, byte *pp) { TIFRaster::Data *helper = (TIFRaster::Data *)img; - Size size = helper->size; +// Size size = helper->size; int iw = toskew + w; bool keep_y = (iw >= 0); int x4 = x >> 2; @@ -694,7 +695,7 @@ static void putContig4(TIFFRGBAImage *img, tif_uint32 *cp, tif_int32 fromskew, tif_int32 toskew, byte *pp) { TIFRaster::Data *helper = (TIFRaster::Data *)img; - Size size = helper->size; //dest.GetSize(); +// Size size = helper->size; //dest.GetSize(); int iw = toskew + w; bool keep_y = (iw >= 0); int x2 = x >> 1; @@ -715,7 +716,7 @@ static void putContig8(TIFFRGBAImage *img, tif_uint32 *cp, tif_int32 fromskew, tif_int32 toskew, byte *pp) { TIFRaster::Data *helper = (TIFRaster::Data *)img; - Size size = helper->size; +// Size size = helper->size; int iw = toskew + w; bool keep_y = (iw >= 0); // byte *dest = helper->dest.GetUpScan(y) + x; @@ -731,7 +732,7 @@ static void putContigRGB(TIFFRGBAImage *img, tif_uint32 *cp, tif_uint32 x, tif_u tif_int32 fromskew, tif_int32 toskew, byte *pp) { TIFRaster::Data *helper = (TIFRaster::Data *)img; - Size size = helper->size; +// Size size = helper->size; int iw = toskew + w; int wh = w * h; if(wh > helper->buffer.GetCount()) @@ -747,7 +748,7 @@ static void putSeparate(TIFFRGBAImage *img, tif_uint32 *cp, tif_int32 fromskew, tif_int32 toskew, byte *r, byte *g, byte *b, byte *a) { TIFRaster::Data *helper = (TIFRaster::Data *)img; - Size size = helper->size; +// Size size = helper->size; int wh = w * h; if(wh > helper->buffer.GetCount()) helper->buffer.SetCount(wh); @@ -813,7 +814,7 @@ void TIFRaster::Data::Warning(const char *fn, const char *fmt, va_list ap) if(!memcmp(fn, "tiff@", 5) && IsDigit(fn[5])) { int addr = stou(fn + 5); if(addr != -1 && addr != 0) { - TIFRaster::Data& wrapper = *reinterpret_cast(addr); +// TIFRaster::Data& wrapper = *reinterpret_cast(addr); LLOG("TIF warning: " << VFormat(fmt, ap)); // RLOG("TiffWrapper::Warning: " << wrapper.errors); } @@ -825,7 +826,7 @@ void TIFRaster::Data::Error(const char *fn, const char *fmt, va_list ap) if(!memcmp(fn, "tiff@", 5) && IsDigit(fn[5])) { int addr = stou(fn + 5); if(addr != -1 && addr != 0) { - Data& wrapper = *reinterpret_cast(addr); +// Data& wrapper = *reinterpret_cast(addr); LLOG("TIF error: " << VFormat(fmt, ap)); // RLOG("TiffWrapper::Error: " << wrapper.errors); } diff --git a/uppsrc/plugin/zip/UnZip.cpp b/uppsrc/plugin/zip/UnZip.cpp index 45ea85a78..4d9b45d89 100644 --- a/uppsrc/plugin/zip/UnZip.cpp +++ b/uppsrc/plugin/zip/UnZip.cpp @@ -40,7 +40,6 @@ void UnZip::ReadDir() zip->Seek(offset); for(int i = 0; i < entries; i++) { - int64 rof = zip->GetPos() - offset; if(zip->Get32le() != 0x02014b50 && zip->IsEof()) return; File& f = file.Add(); @@ -99,7 +98,7 @@ bool UnZip::ReadFile(Stream& out, Gate2 progress) zip->Seek(f.offset); if(zip->Get32le() != 0x04034b50) return false; - int ver = zip->Get16le(); + zip->Get16le(); zip->Get16le(); // Skip header, use info from centrall dir zip->Get16le(); zip->Get32le(); @@ -110,7 +109,7 @@ bool UnZip::ReadFile(Stream& out, Gate2 progress) dword extralen = zip->Get16le(); zip->SeekCur(filelen + extralen); dword crc; - int l; + dword l; if(f.method == 0) { Buffer temp(65536); int loaded;