Skip to content

Commit

Permalink
Merge pull request #9 from offsoc/autofix/alert-12-c3f49d5751
Browse files Browse the repository at this point in the history
Fix code scanning alert torvalds#12: Wrong type of arguments to formatting function
  • Loading branch information
offsoc authored Sep 25, 2024
2 parents 1418c6a + caf121d commit 1af9957
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/boot/tools/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <inttypes.h>
#include <tools/le_byteshift.h>

typedef unsigned char u8;
Expand Down Expand Up @@ -215,8 +216,8 @@ int main(int argc, char ** argv)
if (fstat(fd, &sb))
die("Unable to stat `%s': %m", argv[2]);
if (_edata != sb.st_size)
die("Unexpected file size `%s': %u != %u", argv[2], _edata,
sb.st_size);
die("Unexpected file size `%s': %lu != %lu", argv[2], (unsigned long)_edata,
(unsigned long)sb.st_size);
sz = _edata - 4;
kernel = mmap(NULL, sz, PROT_READ, MAP_SHARED, fd, 0);
if (kernel == MAP_FAILED)
Expand Down

0 comments on commit 1af9957

Please sign in to comment.