summaryrefslogtreecommitdiffstats
path: root/simulator
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2021-02-06 16:29:58 -0700
committerGitHub <noreply@github.com>2021-02-06 16:29:58 -0700
commita1b8330b2506ffa6a30bfc4153149b9184ea76cf (patch)
treef503723aebe715a0acd1eba2d6ba066f3fe53754 /simulator
parentaf7847795c9096067c976901a6149350534ae42c (diff)
downloadbcm5719-ortega-a1b8330b2506ffa6a30bfc4153149b9184ea76cf.tar.gz
bcm5719-ortega-a1b8330b2506ffa6a30bfc4153149b9184ea76cf.zip
build: Fix a number of compiler issues when building utils with gcc. (#208)
Diffstat (limited to 'simulator')
-rw-r--r--simulator/HAL.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/simulator/HAL.cpp b/simulator/HAL.cpp
index c677eba..ab4fce4 100644
--- a/simulator/HAL.cpp
+++ b/simulator/HAL.cpp
@@ -99,7 +99,7 @@ devices_t gSupportedDevices[] = {
bool is_supported(uint16_t vendor_id, uint16_t device_id)
{
- for (unsigned int i = 0; i < ARRAY_ELEMENTS(gSupportedDevices); i++)
+ for (size_t i = 0; i < ARRAY_ELEMENTS(gSupportedDevices); i++)
{
devices_t *pDevice = &gSupportedDevices[i];
if (vendor_id == pDevice->vendor_id && device_id == pDevice->device_id)
@@ -134,7 +134,7 @@ static size_t barlen[MAX_NUM_BARS];
static void unmap_bars()
{
- for(int i = 0; i < ARRAY_ELEMENTS(bar); i++)
+ for(size_t i = 0; i < ARRAY_ELEMENTS(bar); i++)
{
if(bar[i] && barlen[i])
{
@@ -272,7 +272,7 @@ bool initHAL(const char *pci_path, int wanted_function)
printf("Found supported device %x:%x at %s\n", config.vendor_id,
config.device_id, configPath.c_str());
- for (unsigned int i = 0; i < ARRAY_ELEMENTS(config.BAR); i++)
+ for (size_t i = 0; i < ARRAY_ELEMENTS(config.BAR); i++)
{
int memfd;
string BARPath = string(located_pci_path) + "/" BAR_STR + to_string(i);
@@ -288,7 +288,7 @@ bool initHAL(const char *pci_path, int wanted_function)
}
else
{
- printf("mmaping BAR[%d]: %s\n", i, pBARPath);
+ printf("mmaping BAR[%zu]: %s\n", i, pBARPath);
}
if (fstat(memfd, &st) < 0)
OpenPOWER on IntegriCloud