Date: Mon, 5 Nov 2012 18:49:21 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242622 - head/lib/libpmc Message-ID: <201211051849.qA5InLAL059625@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Mon Nov 5 18:49:21 2012 New Revision: 242622 URL: http://svnweb.freebsd.org/changeset/base/242622 Log: 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 Modified: head/lib/libpmc/libpmc.c Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Mon Nov 5 18:18:03 2012 (r242621) +++ head/lib/libpmc/libpmc.c Mon Nov 5 18:49:21 2012 (r242622) @@ -2264,7 +2264,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); @@ -3190,7 +3190,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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211051849.qA5InLAL059625>