Bug 1857 - local variable used before set
Summary: local variable used before set
Status: RESOLVED DUPLICATE of bug 1672
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/GLX (show other bugs)
Version: 6.8.1
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-15 03:37 UTC by dcb314
Modified: 2004-11-14 12:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.