diff options
author | markm <markm@FreeBSD.org> | 2002-07-15 17:28:34 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-07-15 17:28:34 +0000 |
commit | 711bccb1b946d92e6f5fceb68e7d07accc7d7b84 (patch) | |
tree | 611d995bfa5afde4112d973ff5c8daa612c8e242 /sys/kern/kern_sysctl.c | |
parent | a9edfd286eddf54fdd7118c307e775a3e51df327 (diff) | |
download | FreeBSD-src-711bccb1b946d92e6f5fceb68e7d07accc7d7b84.zip FreeBSD-src-711bccb1b946d92e6f5fceb68e7d07accc7d7b84.tar.gz |
Fix a bazillion lint and WARNS warnings. One major fix is the removal of
semicolons from the end of macros:
#define FOO() bar(a,b,c);
becomes
#define FOO() bar(a,b,c)
Thus requiring the semicolon in the invocation of FOO. This is much
cleaner syntax and more consistent with expectations when writing
function-like things in source.
With both peril-sensitive sunglasses and flame-proof undies on, tighten
up some types, and work around some warnings generated by this. There
are some _horrible_ const/non-const issues in this code.
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index f89aa00..8f30fed 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -312,7 +312,7 @@ sysctl_remove_oid(struct sysctl_oid *oidp, int del, int recurse) sysctl_unregister_oid(oidp); if (del) { if (oidp->descr) - free(oidp->descr, M_SYSCTLOID); + free((void *)(uintptr_t)(const void *)oidp->descr, M_SYSCTLOID); free((void *)(uintptr_t)(const void *)oidp->oid_name, M_SYSCTLOID); free(oidp, M_SYSCTLOID); @@ -377,7 +377,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, int len = strlen(descr) + 1; oidp->descr = malloc(len, M_SYSCTLOID, M_WAITOK); if (oidp->descr) - strcpy(oidp->descr, descr); + strcpy((char *)(uintptr_t)(const void *)oidp->descr, descr); } /* Update the context, if used */ if (clist != NULL) |