OSDN Git Service

Fix -Wformat compiler warning in expr.c.
authorElliott Hughes <enh@google.com>
Fri, 7 Jul 2017 20:06:36 +0000 (13:06 -0700)
committerRob Landley <rob@landley.net>
Sun, 9 Jul 2017 06:55:17 +0000 (01:55 -0500)
commit352efdf18d98be859d19bbae2cd2732d2b7f01cf
tree2af6bdf89b3e8fe3b523879aa3d827a58e7b76f6
parent61d0115171681e63366e1321c03ba0ad2d904f6f
Fix -Wformat compiler warning in expr.c.

Android forces -Wformat on for all source.

  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);
                         ~~^~   ~~~~~~~~~~~~~~~~~~~~~
toys/pending/expr.c