diff options
author | dim <dim@FreeBSD.org> | 2012-11-05 18:49:21 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-11-05 18:49:21 +0000 |
commit | 9413d826123906120b1317ad76bcc03cada2f98a (patch) | |
tree | b6a7a07716fc74de4243f205430143922e8452d8 /lib/libpmc/libpmc.c | |
parent | ea4fbae8905930562ad1fc0ccd6281587a23c93f (diff) | |
download | FreeBSD-src-9413d826123906120b1317ad76bcc03cada2f98a.zip FreeBSD-src-9413d826123906120b1317ad76bcc03cada2f98a.tar.gz |
Fix a few warnings from newer clang 3.2 in libpmc, about comparing enum
pmc_event values against integer constants which fall outside the enum
range.
Reviewed by: fabient, sbruno
MFC after: 3 days
Diffstat (limited to 'lib/libpmc/libpmc.c')
-rw-r--r-- | lib/libpmc/libpmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index 85c460d..4fb2572 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -2264,7 +2264,7 @@ soft_allocate_pmc(enum pmc_event pe, char *ctrspec, (void)ctrspec; (void)pmc_config; - if (pe < PMC_EV_SOFT_FIRST || pe > PMC_EV_SOFT_LAST) + if ((int)pe < PMC_EV_SOFT_FIRST || (int)pe > PMC_EV_SOFT_LAST) return (-1); pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); @@ -3190,7 +3190,7 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype cpu) } else if (pe == PMC_EV_TSC_TSC) { ev = tsc_event_table; evfence = tsc_event_table + PMC_EVENT_TABLE_SIZE(tsc); - } else if (pe >= PMC_EV_SOFT_FIRST && pe <= PMC_EV_SOFT_LAST) { + } else if ((int)pe >= PMC_EV_SOFT_FIRST && (int)pe <= PMC_EV_SOFT_LAST) { ev = soft_event_table; evfence = soft_event_table + soft_event_info.pm_nevent; } |