On 06/04/12 12:01, Jim Meyering wrote:
> I wrote this patch back in December, but apparently never posted it.
> Here you go:
> 
>>From 41c8facd83f6497ded1f42163f3b472124f75f14 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <[email protected]>
> Date: Fri, 23 Dec 2011 23:19:41 +0100
> Subject: [PATCH] compile_exp: don't return an uninitialized pointer upon
>  failure
> 
> As a result of its improved flow analysis gcc-4.7.0 20111202 reported:
> 
>   syntax.c: In function 'compile_exp':
>   syntax.c:1694:5: warning: 'v' may be used uninitialized in this \
>   function [-Wmaybe-uninitialized]
> 
> However, compile_exp calls many functions that return values that are
> then assigned to "v".  Only two of those had a problem: in each there
> is an error path by which the returned pointer is not initialized.
> * src/syntax.c (compile_concat): Initialize "v".
> (compile_minus): Likewise.

Thanks for the fix, applied.

-- 
Dominic Cleal
Red Hat Consulting
m: +44 (0)7817 878113

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to