sys/vm: quiet -Wwrite-strings
Discussed with: kib Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D23796
This commit is contained in:
parent
b8bf627b18
commit
eaa17d4291
@ -153,7 +153,7 @@ static int numzones = MALLOC_DEBUG_MAXZONES;
|
||||
*/
|
||||
struct {
|
||||
int kz_size;
|
||||
char *kz_name;
|
||||
const char *kz_name;
|
||||
uma_zone_t kz_zone[MALLOC_DEBUG_MAXZONES];
|
||||
} kmemzones[] = {
|
||||
{16, "16", },
|
||||
@ -1091,7 +1091,7 @@ mallocinit(void *dummy)
|
||||
UMA_ALIGN_PTR, UMA_ZONE_MALLOC);
|
||||
for (i = 0, indx = 0; kmemzones[indx].kz_size != 0; indx++) {
|
||||
int size = kmemzones[indx].kz_size;
|
||||
char *name = kmemzones[indx].kz_name;
|
||||
const char *name = kmemzones[indx].kz_name;
|
||||
int subzone;
|
||||
|
||||
for (subzone = 0; subzone < numzones; subzone++) {
|
||||
|
@ -554,7 +554,7 @@ void bufdone(struct buf *);
|
||||
void bd_speedup(void);
|
||||
|
||||
extern uma_zone_t pbuf_zone;
|
||||
uma_zone_t pbuf_zsecond_create(char *name, int max);
|
||||
uma_zone_t pbuf_zsecond_create(const char *name, int max);
|
||||
|
||||
int cluster_read(struct vnode *, u_quad_t, daddr_t, long,
|
||||
struct ucred *, long, int, int, struct buf **);
|
||||
|
@ -223,7 +223,7 @@ struct uma_kctor_args {
|
||||
|
||||
struct uma_bucket_zone {
|
||||
uma_zone_t ubz_zone;
|
||||
char *ubz_name;
|
||||
const char *ubz_name;
|
||||
int ubz_entries; /* Number of items it can hold. */
|
||||
int ubz_maxsize; /* Maximum allocation size per-item. */
|
||||
};
|
||||
|
@ -5108,7 +5108,7 @@ vm_map_print(vm_map_t map)
|
||||
(void *)entry, (void *)entry->start, (void *)entry->end,
|
||||
entry->eflags);
|
||||
{
|
||||
static char *inheritance_name[4] =
|
||||
static const char * const inheritance_name[4] =
|
||||
{"share", "copy", "none", "donate_copy"};
|
||||
|
||||
db_iprintf(" prot=%x/%x/%s",
|
||||
|
@ -386,7 +386,7 @@ vm_object_pip_wakeupn(vm_object_t object, short i)
|
||||
* re-acquired on return.
|
||||
*/
|
||||
static void
|
||||
vm_object_pip_sleep(vm_object_t object, char *waitid)
|
||||
vm_object_pip_sleep(vm_object_t object, const char *waitid)
|
||||
{
|
||||
|
||||
refcount_sleep_interlock(&object->paging_in_progress,
|
||||
@ -394,7 +394,7 @@ vm_object_pip_sleep(vm_object_t object, char *waitid)
|
||||
}
|
||||
|
||||
void
|
||||
vm_object_pip_wait(vm_object_t object, char *waitid)
|
||||
vm_object_pip_wait(vm_object_t object, const char *waitid)
|
||||
{
|
||||
|
||||
VM_OBJECT_ASSERT_WLOCKED(object);
|
||||
@ -406,7 +406,7 @@ vm_object_pip_wait(vm_object_t object, char *waitid)
|
||||
}
|
||||
|
||||
void
|
||||
vm_object_pip_wait_unlocked(vm_object_t object, char *waitid)
|
||||
vm_object_pip_wait_unlocked(vm_object_t object, const char *waitid)
|
||||
{
|
||||
|
||||
VM_OBJECT_ASSERT_UNLOCKED(object);
|
||||
|
@ -337,8 +337,8 @@ void vm_object_clear_flag(vm_object_t object, u_short bits);
|
||||
void vm_object_pip_add(vm_object_t object, short i);
|
||||
void vm_object_pip_wakeup(vm_object_t object);
|
||||
void vm_object_pip_wakeupn(vm_object_t object, short i);
|
||||
void vm_object_pip_wait(vm_object_t object, char *waitid);
|
||||
void vm_object_pip_wait_unlocked(vm_object_t object, char *waitid);
|
||||
void vm_object_pip_wait(vm_object_t object, const char *waitid);
|
||||
void vm_object_pip_wait_unlocked(vm_object_t object, const char *waitid);
|
||||
|
||||
void vm_object_busy(vm_object_t object);
|
||||
void vm_object_unbusy(vm_object_t object);
|
||||
|
@ -451,13 +451,14 @@ vm_page_domain_init(int domain)
|
||||
|
||||
vmd = VM_DOMAIN(domain);
|
||||
bzero(vmd, sizeof(*vmd));
|
||||
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_INACTIVE].pq_name) =
|
||||
*__DECONST(const char **, &vmd->vmd_pagequeues[PQ_INACTIVE].pq_name) =
|
||||
"vm inactive pagequeue";
|
||||
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_name) =
|
||||
*__DECONST(const char **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_name) =
|
||||
"vm active pagequeue";
|
||||
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) =
|
||||
*__DECONST(const char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) =
|
||||
"vm laundry pagequeue";
|
||||
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_name) =
|
||||
*__DECONST(const char **,
|
||||
&vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_name) =
|
||||
"vm unswappable pagequeue";
|
||||
vmd->vmd_domain = domain;
|
||||
vmd->vmd_page_count = 0;
|
||||
|
@ -191,7 +191,7 @@ vm_pager_bufferinit(void)
|
||||
}
|
||||
|
||||
uma_zone_t
|
||||
pbuf_zsecond_create(char *name, int max)
|
||||
pbuf_zsecond_create(const char *name, int max)
|
||||
{
|
||||
uma_zone_t zone;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user