* [PATCH] db: fix uninitialised variable warnings
@ 2015-08-05 22:49 Dave Chinner
2015-08-07 11:37 ` Brian Foster
0 siblings, 1 reply; 2+ messages in thread
From: Dave Chinner @ 2015-08-05 22:49 UTC (permalink / raw)
To: xfs
From: Dave Chinner <dchinner@redhat.com>
New versions of gcc barf on the conversion table code in
db/convert.c. Shut it up by initialising the conversion array.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
db/convert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/db/convert.c b/db/convert.c
index 09f9225..a337abe 100644
--- a/db/convert.c
+++ b/db/convert.c
@@ -157,7 +157,7 @@ convert_f(int argc, char **argv)
{
ctype_t c;
int conmask;
- cval_t cvals[NCTS];
+ cval_t cvals[NCTS] = {};
int i;
int mask;
__uint64_t v;
--
2.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] db: fix uninitialised variable warnings
2015-08-05 22:49 [PATCH] db: fix uninitialised variable warnings Dave Chinner
@ 2015-08-07 11:37 ` Brian Foster
0 siblings, 0 replies; 2+ messages in thread
From: Brian Foster @ 2015-08-07 11:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Thu, Aug 06, 2015 at 08:49:52AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> New versions of gcc barf on the conversion table code in
> db/convert.c. Shut it up by initialising the conversion array.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> db/convert.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/db/convert.c b/db/convert.c
> index 09f9225..a337abe 100644
> --- a/db/convert.c
> +++ b/db/convert.c
> @@ -157,7 +157,7 @@ convert_f(int argc, char **argv)
> {
> ctype_t c;
> int conmask;
> - cval_t cvals[NCTS];
> + cval_t cvals[NCTS] = {};
> int i;
> int mask;
> __uint64_t v;
> --
> 2.1.4
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-07 11:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05 22:49 [PATCH] db: fix uninitialised variable warnings Dave Chinner
2015-08-07 11:37 ` Brian Foster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox