Discussion:
expr warning fixes
(too old to reply)
Frank Barchard
2017-04-10 18:45:27 UTC
Permalink
Raw Message
There are 2 warnings in expr.c which occur during android builds:

external/toybox/toys/pending/expr.c:116:28: warning: field precision should
have type 'int', but argument has type 'long' [-Wformat]
ret->s = xmprintf("%.*s", m[1].rm_eo-m[1].rm_so, target+m[1].rm_so);
~~^~ ~~~~~~~~~~~~~~~~~~~~~
external/toybox/toys/pending/expr.c:247:24: warning: missing field 'i'
initializer [-Wmissing-field-initializers]
struct value ret = {0};
^

I proposed a patch there, but they suggested doing the fix here first.

Filed issue here:
https://github.com/landley/toybox/issues/64

Attached is the git format-patch -1 patch

Loading...