7022280: Parfait reports Format string argument mismatch in /jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c

Reviewed-by: jgodinez, prr
This commit is contained in:
Andrew Brygin 2011-03-09 13:08:03 +03:00
parent 6984d3041c
commit b190c24737

View File

@ -240,7 +240,7 @@ makeDefaultConfig(JNIEnv *env, int screen) {
AwtGraphicsConfigDataPtr defaultConfig; AwtGraphicsConfigDataPtr defaultConfig;
int xinawareScreen = 0; int xinawareScreen = 0;
VisualID forcedVisualID, defaultVisualID; VisualID forcedVisualID = 0, defaultVisualID;
char *forcedVisualStr; char *forcedVisualStr;
XVisualInfo vinfo; XVisualInfo vinfo;
long mask; long mask;
@ -254,7 +254,7 @@ makeDefaultConfig(JNIEnv *env, int screen) {
if ((forcedVisualStr = getenv("FORCEDEFVIS"))) { if ((forcedVisualStr = getenv("FORCEDEFVIS"))) {
mask = VisualIDMask | VisualScreenMask; mask = VisualIDMask | VisualScreenMask;
if (sscanf(forcedVisualStr, "%x", &forcedVisualID) > 0 && if (sscanf(forcedVisualStr, "%lx", &forcedVisualID) > 0 &&
forcedVisualID > 0) forcedVisualID > 0)
{ {
vinfo.visualid = forcedVisualID; vinfo.visualid = forcedVisualID;