diff options
author | eadler <eadler@FreeBSD.org> | 2012-05-31 08:22:02 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2012-05-31 08:22:02 +0000 |
commit | b2cd8b6afd6b06a2715c711ec3cfcdabd359fa86 (patch) | |
tree | f25d078afdd36cf2cdd1370d4b278ed5c91a1659 | |
parent | 4ade65012f6305217140e627fee89ca929a712e1 (diff) | |
download | FreeBSD-src-b2cd8b6afd6b06a2715c711ec3cfcdabd359fa86.zip FreeBSD-src-b2cd8b6afd6b06a2715c711ec3cfcdabd359fa86.tar.gz |
Fix a variety of compile errors with gcc48 and clang
PR: bin/165699
Submitted by: Arne Meyer <meyer.arne83@gmail.com>
Approved by: cperciva
MFC after: 1 week
-rw-r--r-- | sbin/mca/Makefile | 1 | ||||
-rw-r--r-- | sbin/mca/mca.c | 16 |
2 files changed, 10 insertions, 7 deletions
diff --git a/sbin/mca/Makefile b/sbin/mca/Makefile index e025a23..2616725 100644 --- a/sbin/mca/Makefile +++ b/sbin/mca/Makefile @@ -1,6 +1,5 @@ # $FreeBSD$ PROG= mca -WARNS?= 4 MAN= mca.8 .include <bsd.prog.mk> diff --git a/sbin/mca/mca.c b/sbin/mca/mca.c index f774ac6..ed7bcff 100644 --- a/sbin/mca/mca.c +++ b/sbin/mca/mca.c @@ -55,10 +55,10 @@ __FBSDID("$FreeBSD$"); #define HW_MCA_MAX_CPUID 255 -static char hw_mca_count[] = "hw.mca.count"; -static char hw_mca_first[] = "hw.mca.first"; -static char hw_mca_last[] = "hw.mca.last"; -static char hw_mca_recid[] = "hw.mca.%lu.%u"; +static const char hw_mca_count[] = "hw.mca.count"; +static const char hw_mca_first[] = "hw.mca.first"; +static const char hw_mca_last[] = "hw.mca.last"; +static const char hw_mca_recid[] = "hw.mca.%d.%u"; static char default_dumpfile[] = "/var/log/mca.log"; @@ -162,7 +162,9 @@ show_cpu(struct mca_cpu_record *cpu) char var[16]; struct mca_cpu_mod *mod; struct mca_cpu_cpuid *cpuid; +#ifdef notyet struct mca_cpu_psi *psi; +#endif int i, n; printf(" <cpu>\n"); @@ -200,8 +202,10 @@ show_cpu(struct mca_cpu_record *cpu) show_value(6, var, "0x%016llx", (long long)cpuid->cpuid[i]); } - psi = (struct mca_cpu_psi*)(cpuid + 1); - /* TODO: Dump PSI */ +#ifdef notyet + psi = (struct mca_cpu_psi*)(cpuid + 1); +#endif + /* TODO: Dump PSI */ printf(" </cpu>\n"); } |