7022280: Parfait reports Format string argument mismatch in /jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
Reviewed-by: jgodinez, prr
--- a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Tue Mar 08 11:47:38 2011 -0800
+++ b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Wed Mar 09 13:08:03 2011 +0300
@@ -240,7 +240,7 @@
AwtGraphicsConfigDataPtr defaultConfig;
int xinawareScreen = 0;
- VisualID forcedVisualID, defaultVisualID;
+ VisualID forcedVisualID = 0, defaultVisualID;
char *forcedVisualStr;
XVisualInfo vinfo;
long mask;
@@ -254,7 +254,7 @@
if ((forcedVisualStr = getenv("FORCEDEFVIS"))) {
mask = VisualIDMask | VisualScreenMask;
- if (sscanf(forcedVisualStr, "%x", &forcedVisualID) > 0 &&
+ if (sscanf(forcedVisualStr, "%lx", &forcedVisualID) > 0 &&
forcedVisualID > 0)
{
vinfo.visualid = forcedVisualID;