MonetDB: default - Initialize variables with a fake value so tha...

Stefan Manegold Stefan.Manegold at cwi.nl
Thu Jul 11 12:40:23 CEST 2013


Thank you very much, Sjoerd!

However, this is not yet sufficient to get this compiled (with optimization enabled):

.../monetdb5/optimizer/opt_json.c:54:6: error: 'j' may be used uninitialized in this function [-Werror=maybe-uninitialized]

However, simply initializing variable j when it is declared might not be the correct solution since it depends on itself:

                        j = getArg(q,j);
                        ^            ^
                        [...]
                        pushArgument(mb,q,j);
                                          ^

Martin,

can you please double-check your code and fix (also) the initilization / use of variable j according to the intended functionality?

Thanks!

Stefan


----- Original Message -----
> Changeset: fc7c72bf8a56 for MonetDB
> URL:
> http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc7c72bf8a56
> Modified Files:
> 	monetdb5/optimizer/opt_json.c
> Branch: default
> Log Message:
> 
> Initialize variables with a fake value so that this can be compiled.
> 
> 
> diffs (12 lines):
> 
> diff --git a/monetdb5/optimizer/opt_json.c
> b/monetdb5/optimizer/opt_json.c
> --- a/monetdb5/optimizer/opt_json.c
> +++ b/monetdb5/optimizer/opt_json.c
> @@ -30,7 +30,7 @@ int
>  OPTjsonImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
>  InstrPtr pci)
>  {
>  	int i, j, limit, slimit;
> -	int bu,br,bj;
> +	int bu = 0, br = 0, bj = 0;
>  	str nme;
>  	InstrPtr p,q;
>  	int actions = 0;
> _______________________________________________
> checkin-list mailing list
> checkin-list at monetdb.org
> http://mail.monetdb.org/mailman/listinfo/checkin-list
> 

-- 
| Stefan.Manegold at CWI.nl | DB Architectures   (DA) |
| www.CWI.nl/~manegold/  | Science Park 123 (L321) |
| +31 (0)20 592-4212     | 1098 XG Amsterdam  (NL) |




More information about the developers-list mailing list