Author: dim Date: Fri Nov 9 19:32:37 2012 New Revision: 242837 URL: http://svnweb.freebsd.org/changeset/base/242837
Log: MFC r242622: 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 Modified: stable/9/lib/libpmc/libpmc.c Directory Properties: stable/9/lib/libpmc/ (props changed) Modified: stable/9/lib/libpmc/libpmc.c ============================================================================== --- stable/9/lib/libpmc/libpmc.c Fri Nov 9 19:31:31 2012 (r242836) +++ stable/9/lib/libpmc/libpmc.c Fri Nov 9 19:32:37 2012 (r242837) @@ -2261,7 +2261,7 @@ soft_allocate_pmc(enum pmc_event pe, cha (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); @@ -3168,7 +3168,7 @@ _pmc_name_of_event(enum pmc_event pe, en } 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; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"