diff options
author | Andrew Waterman <andrew@sifive.com> | 2020-12-29 01:47:56 -0800 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2020-12-29 01:47:56 -0800 |
commit | 29829bb3266866ba2ec742c34857b02a04b5405e (patch) | |
tree | 6e5d4a3931271007272579a6f47f4ef1db7c9690 | |
parent | 34de90b78eddd49c880ae46cfbcf274822e9c5da (diff) | |
download | spike-29829bb3266866ba2ec742c34857b02a04b5405e.zip spike-29829bb3266866ba2ec742c34857b02a04b5405e.tar.gz spike-29829bb3266866ba2ec742c34857b02a04b5405e.tar.bz2 |
Fix compile warnings
-rw-r--r-- | fdt/libfdt_env.h | 4 | ||||
-rw-r--r-- | spike_main/spike.cc | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/fdt/libfdt_env.h b/fdt/libfdt_env.h index 2363810..44bd12a 100644 --- a/fdt/libfdt_env.h +++ b/fdt/libfdt_env.h @@ -11,9 +11,7 @@ #include <stdint.h> #include <stdbool.h> #include <stdlib.h> - -#define INT_MAX INT32_MAX -#define UINT_MAX UINT32_MAX +#include <limits.h> #ifdef __CHECKER__ #define FDT_FORCE __attribute__((force)) diff --git a/spike_main/spike.cc b/spike_main/spike.cc index 53a6b79..b86f829 100644 --- a/spike_main/spike.cc +++ b/spike_main/spike.cc @@ -167,7 +167,7 @@ static std::vector<std::pair<reg_t, mem_t*>> make_mems(const char* arg) if (size != size0) { fprintf(stderr, "Warning: the memory at [0x%llX, 0x%llX] has been realigned\n" "to the %ld KiB page size: [0x%llX, 0x%llX]\n", - base0, base0 + size0 - 1, PGSIZE / 1024, base, base + size - 1); + base0, base0 + size0 - 1, long(PGSIZE / 1024), base, base + size - 1); } res.push_back(std::make_pair(reg_t(base), new mem_t(size))); |