[PATCHv2] Fix "possibly uninitialized" warnings in glx.
Daniel Stone
daniel at fooishbar.org
Sat Oct 3 18:04:44 PDT 2009
On Fri, Oct 02, 2009 at 02:20:33PM -0700, Jamey Sharp wrote:
> In both functions, "answer" was uninitialized if "compsize" was 0, but in
> that case __GLX_SEND_VOID_ARRAY(compsize) results in a call to
> WriteToClient for 0 bytes, which returns immediately without examining the
> "answer" argument. So initializing to a null pointer is as good as
> anything else.
>
> Signed-off-by: Jamey Sharp <jamey at minilop.net>
> ---
> On Fri, Oct 02, 2009 at 11:09:49PM +0200, Rémi Cardona wrote:
> > > - char *answer, answerBuffer[200];
> > > + char *answer = 0, answerBuffer[200];
> >
> > Why not NULL instead of 0?
>
> Personal habit. Here's a revised patch.
Thanks. Acked-by: Daniel Stone <daniel at fooishbar.org>, merged into
~daniels/xserver.
Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091004/9c8d9c0d/attachment.pgp
More information about the xorg-devel
mailing list