|
From: <ai...@us...> - 2013-10-24 18:54:22
|
Revision: 12625
http://sourceforge.net/p/plplot/code/12625
Author: airwin
Date: 2013-10-24 18:54:19 +0000 (Thu, 24 Oct 2013)
Log Message:
-----------
Set some variables to quiet false-alarm warnings from -O3 -Wuninitialized.
Modified Paths:
--------------
trunk/src/plbox.c
trunk/src/pldtik.c
trunk/src/plmap.c
Modified: trunk/src/plbox.c
===================================================================
--- trunk/src/plbox.c 2013-10-24 18:22:29 UTC (rev 12624)
+++ trunk/src/plbox.c 2013-10-24 18:54:19 UTC (rev 12625)
@@ -1394,7 +1394,7 @@
PLBOOL ldy, lfy, liy, lly, lmy, lny, lty, lvy, loy, lxy;
PLFLT vpwxmi, vpwxma, vpwymi, vpwyma;
PLFLT vpwxmin, vpwxmax, vpwymin, vpwymax;
- PLFLT pos, tn, tp, offset, height, just;
+ PLFLT tn, tp, offset;
PLFLT factor, tstart;
const char *timefmt = NULL;
PLFLT default_mm, char_height_mm, height_mm;
@@ -1404,6 +1404,12 @@
// label function is provided.
PLBOOL custom_exponent_placement = !plsc->label_func && plsc->label_data;
+ // pos, height, and just are unnecessarily set to quiet
+ // -O3 -Wuninitialized warnings that are obvious false alarms from
+ // the clarity of the code associated with the true or false
+ // result for custom_exponent_placement.
+ PLFLT pos = 0.0, height = 0.0, just = 0.0;
+
plgchr( &default_mm, &char_height_mm );
// Set plot options from input
@@ -1880,7 +1886,7 @@
PLBOOL ldy, lfy, liy, lly, lmy, lny, lty, lvy, loy, lxy;
PLFLT vpwxmi, vpwxma, vpwymi, vpwyma;
PLFLT vpwxmin, vpwxmax, vpwymin, vpwymax;
- PLFLT pos, tn, offset, height, just;
+ PLFLT tn, offset;
const char *timefmt;
PLINT i;
PLINT xdigmax, xdigits, xdigmax_old, xdigits_old;
@@ -1894,6 +1900,12 @@
// label function is provided.
PLBOOL custom_exponent_placement = !plsc->label_func && plsc->label_data;
+ // pos, height, and just are unnecessarily set to quiet
+ // -O3 -Wuninitialized warnings that are obvious false alarms from
+ // the clarity of the code associated with the true or false
+ // result for custom_exponent_placement.
+ PLFLT pos = 0.0, height = 0.0, just = 0.0;
+
plgchr( &default_mm, &char_height_mm );
// Save some parameters
Modified: trunk/src/pldtik.c
===================================================================
--- trunk/src/pldtik.c 2013-10-24 18:22:29 UTC (rev 12624)
+++ trunk/src/pldtik.c 2013-10-24 18:54:19 UTC (rev 12625)
@@ -39,7 +39,8 @@
{
PLFLT t1, t2, tick_reasonable;
PLINT np, ns;
- PLFLT factor;
+ // Unnecessarily set factor to quiet -O3 -Wuninitialized warnings.
+ PLFLT factor = 0.0;
if ( ld )
Modified: trunk/src/plmap.c
===================================================================
--- trunk/src/plmap.c 2013-10-24 18:22:29 UTC (rev 12624)
+++ trunk/src/plmap.c 2013-10-24 18:54:19 UTC (rev 12625)
@@ -125,7 +125,8 @@
#ifdef HAVE_SHAPELIB
SHPHandle in;
int nentries;
- int nparts;
+ // Unnecessarily set nparts to quiet -O3 -Wuninitialized warnings.
+ int nparts = 0;
int entrynumber = 0;
int partnumber = 0;
int shapetype;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|