OSDN Git Service

tools: Fix build-error on 32-bit systems
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 2 Apr 2015 08:29:48 +0000 (11:29 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 2 Apr 2015 08:33:20 +0000 (11:33 +0300)
commit2ca2bdce02407c572fb0792dcebb9e876a3d553a
tree8d4a595401e72af733e4c2acc3ea73fd3cd76453
parent1db97762e976bdf9304ffc9873b052fbaec48de1
tools: Fix build-error on 32-bit systems

The %zX format specifier for st_size causes the following warning:

tools/create-image.c:120:5: error: format ‘%zX’ expects argument of type ‘size_t’, but argument 10 has type ‘__off_t’ [-Werror=format=]
      st.st_size, 0, 0, 0, 0, namelen + 1, 0, name);
      ^

The best way to solve this (as off_t doesn't have a standard format
specifier) is to use 'j' and do a typecast to uintmax_t.
tools/create-image.c