Date: Sat, 31 Dec 2011 12:37:07 +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: r229076 - head/sys/dev/hwpmc Message-ID: <201112311237.pBVCb7v5062923@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sat Dec 31 12:37:07 2011 New Revision: 229076 URL: http://svn.freebsd.org/changeset/base/229076 Log: In sys/dev/hwpmc/hwpmc_amd.c, fix a clang warning about invalid enum conversions. Reviewed by: jkoshy MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_amd.c Modified: head/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_amd.c Sat Dec 31 12:12:41 2011 (r229075) +++ head/sys/dev/hwpmc/hwpmc_amd.c Sat Dec 31 12:37:07 2011 (r229076) @@ -889,7 +889,6 @@ pmc_amd_initialize(void) * field returned by CPUID for instruction family >= 6. */ - class = cputype = -1; name = NULL; switch (cpu_id & 0xF00) { #if defined(__i386__) @@ -906,9 +905,8 @@ pmc_amd_initialize(void) class = PMC_CLASS_K8; name = "K8"; break; - } - if ((int) cputype == -1) { + default: (void) printf("pmc: Unknown AMD CPU.\n"); return NULL; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112311237.pBVCb7v5062923>