[Rpm-maint] [rpm-software-management/rpm] Add ternary operator support to expression parser (#838)
Panu Matilainen
notifications at github.com
Wed Sep 18 11:48:58 UTC 2019
pmatilai commented on this pull request.
> + result = v1->data.i != 0;
+ break;
+ case VALUE_TYPE_STRING:
+ result = v1->data.s[0] != '\0';
+ break;
+ default:
+ goto err;
+ }
+ valueFree(v1);
+ if (rdToken(state))
+ goto err;
+ v1 = doTernary(state);
+ if (v1 == NULL)
+ goto err;
+ if (state->nextToken != TOK_TERNARY_ALT) {
+ exprErr(&state, _("syntax error in expression"), state->p);
expression.c: In function ‘doTernary’:
expression.c:712:15: warning: passing argument 1 of ‘exprErr’ from incompatible pointer type [-Wincompatible-pointer-types]
712 | exprErr(&state, _("syntax error in expression"), state->p);
| ^~~~~~
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/838#pullrequestreview-289857702
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190918/55d13da7/attachment.html>
More information about the Rpm-maint
mailing list