mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
Add explicit initialization for return values
Plain types were automatically initialized to NULL up to and including ANTLR 3.2, but this changed (for the better) in later versions.
This commit is contained in:
parent
59c0547d28
commit
55d6205cf8
@ -48,6 +48,7 @@ options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
query returns [ pANTLR3_STRING result ]
|
query returns [ pANTLR3_STRING result ]
|
||||||
|
@init { $result = NULL; }
|
||||||
: e = expr
|
: e = expr
|
||||||
{
|
{
|
||||||
if (!$e.valid)
|
if (!$e.valid)
|
||||||
|
@ -54,6 +54,7 @@ options {
|
|||||||
}
|
}
|
||||||
|
|
||||||
query returns [ pANTLR3_STRING result ]
|
query returns [ pANTLR3_STRING result ]
|
||||||
|
@init { $result = NULL; }
|
||||||
: e = expr
|
: e = expr
|
||||||
{
|
{
|
||||||
if (!$e.valid)
|
if (!$e.valid)
|
||||||
@ -225,6 +226,7 @@ strcrit returns [ pANTLR3_STRING result, int valid ]
|
|||||||
;
|
;
|
||||||
|
|
||||||
strop returns [ pANTLR3_COMMON_TOKEN op ]
|
strop returns [ pANTLR3_COMMON_TOKEN op ]
|
||||||
|
@init { $op = NULL; }
|
||||||
: n = EQUAL
|
: n = EQUAL
|
||||||
{ $op = $n->getToken($n); }
|
{ $op = $n->getToken($n); }
|
||||||
| n = INCLUDES
|
| n = INCLUDES
|
||||||
@ -297,6 +299,7 @@ intcrit returns [ pANTLR3_STRING result, int valid ]
|
|||||||
;
|
;
|
||||||
|
|
||||||
intop returns [ pANTLR3_COMMON_TOKEN op ]
|
intop returns [ pANTLR3_COMMON_TOKEN op ]
|
||||||
|
@init { $op = NULL; }
|
||||||
: n = EQUAL
|
: n = EQUAL
|
||||||
{ $op = $n->getToken($n); }
|
{ $op = $n->getToken($n); }
|
||||||
| n = LESS
|
| n = LESS
|
||||||
@ -369,6 +372,7 @@ datecrit returns [ pANTLR3_STRING result, int valid ]
|
|||||||
;
|
;
|
||||||
|
|
||||||
dateop returns [ pANTLR3_COMMON_TOKEN op ]
|
dateop returns [ pANTLR3_COMMON_TOKEN op ]
|
||||||
|
@init { $op = NULL; }
|
||||||
: n = BEFORE
|
: n = BEFORE
|
||||||
{ $op = $n->getToken($n); }
|
{ $op = $n->getToken($n); }
|
||||||
| n = AFTER
|
| n = AFTER
|
||||||
|
Loading…
Reference in New Issue
Block a user