Bug 1857

Summary: local variable used before set
Product: xorg Reporter: dcb314
Component: Server/Ext/GLXAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: high    
Version: 6.8.1   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description dcb314 2004-11-15 03:37:09 UTC
Hello there,

I just tried to compile X11R6.8.1 with the most excellent Intel C
8.1 compiler, on a Linux Fedora Core 3 box. The compiler said

glxcmds.c(1508): remark #592: variable "req" is used before its value is set

The source code is in file

./lib/GL/glx/glxcmds.c

The source code is

    if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) {
    xGLXQueryContextReq * req;

    req->reqType = opcode;
    req->glxCode = X_GLXQueryContext;
    req->context = (unsigned int)(ctx->xid);
    }

Clearly, the compiler is correct. Suggest init req before first use.
Comment 1 Adam Jackson 2004-11-15 07:19:42 UTC

*** This bug has been marked as a duplicate of 1672 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.