[Toybox] expr warning fixes
    Frank Barchard 
    fbarchard at google.com
       
    Mon Apr 10 11:45:27 PDT 2017
    
    
  
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170410/11b44ddb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-toybox-expr-fixes-for-warnings.patch
Type: text/x-patch
Size: 2388 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170410/11b44ddb/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4849 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170410/11b44ddb/attachment-0005.bin>
    
    
More information about the Toybox
mailing list