summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-01-22 22:16:47 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-01-22 22:16:47 -0800
commitc5439c3cf188a8af949885f80205bd8054705737 (patch)
treed5bb72df15db51df783436a07bd33452c2a49cf6
parentab56e2507a699e5e24b5bb0dd2ec6826718428e1 (diff)
downloadtest16-c5439c3cf188a8af949885f80205bd8054705737.tar.gz
test16-c5439c3cf188a8af949885f80205bd8054705737.tar.xz
test16-c5439c3cf188a8af949885f80205bd8054705737.zip
run16: clean up warnings
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--run16.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/run16.c b/run16.c
index a814ba4..7a81de8 100644
--- a/run16.c
+++ b/run16.c
@@ -3,6 +3,7 @@
*/
#define _GNU_SOURCE
+#include <unistd.h>
#include <syscall.h>
#include <stdio.h>
#include <sys/syscall.h>
@@ -14,7 +15,7 @@
#include <asm/unistd.h>
#include <sys/mman.h>
-static char toybox[65536] __attribute__((aligned(4096)));
+static unsigned char toybox[65536] __attribute__((aligned(4096)));
#define LOAD_ADDR 0x1000
@@ -52,7 +53,7 @@ static void load_file(const char *file, unsigned int trampoline_addr)
FILE *f = fopen(file, "rb");
if (!f) {
- fprintf(stderr, "%s: could not open: %s\n", file);
+ fprintf(stderr, "run16: could not open: %s\n", file);
exit(127);
}
@@ -129,8 +130,6 @@ static void run(const char *file)
int main(int argc, char *argv[])
{
- int i;
-
if (argc != 2) {
fprintf(stderr, "Usage: %s filename\n", argv[0]);
return 127;