Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145540829
D23798.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D23798.diff
View Options
Index: head/sys/kern/kern_cons.c
===================================================================
--- head/sys/kern/kern_cons.c
+++ head/sys/kern/kern_cons.c
@@ -98,7 +98,7 @@
static struct callout conscallout; /* callout for outputting to constty */
struct msgbuf consmsgbuf; /* message buffer for console tty */
static u_char console_pausing; /* pause after each line during probe */
-static char *console_pausestr=
+static const char console_pausestr[] =
"<pause; press any key to proceed to next line or '.' to end pause mode>";
struct tty *constty; /* pointer to console "window" tty */
static struct mtx cnputs_mtx; /* Mutex for cnputs(). */
@@ -510,7 +510,7 @@
{
struct cn_device *cnd;
struct consdev *cn;
- char *cp;
+ const char *cp;
#ifdef EARLY_PRINTF
if (early_putc != NULL) {
@@ -571,7 +571,7 @@
}
void
-cnputs(char *p)
+cnputs(const char *p)
{
cnputsn(p, strlen(p));
}
Index: head/sys/kern/kern_linker.c
===================================================================
--- head/sys/kern/kern_linker.c
+++ head/sys/kern/kern_linker.c
@@ -1765,7 +1765,7 @@
TUNABLE_STR("module_path", linker_path, sizeof(linker_path));
-static char *linker_ext_list[] = {
+static const char * const linker_ext_list[] = {
"",
".ko",
NULL
@@ -1782,7 +1782,8 @@
{
struct nameidata nd;
struct thread *td = curthread; /* XXX */
- char *result, **cpp, *sep;
+ const char * const *cpp, *sep;
+ char *result;
int error, len, extlen, reclen, flags;
enum vtype type;
@@ -1838,8 +1839,9 @@
struct ucred *cred = td ? td->td_ucred : NULL;
struct nameidata nd;
struct vattr vattr, mattr;
+ const char *best, *sep;
u_char *hints = NULL;
- u_char *cp, *recptr, *bufend, *result, *best, *pathbuf, *sep;
+ u_char *cp, *recptr, *bufend, *result, *pathbuf;
int error, ival, bestver, *intp, found, flags, clen, blen;
ssize_t reclen;
Index: head/sys/kern/kern_shutdown.c
===================================================================
--- head/sys/kern/kern_shutdown.c
+++ head/sys/kern/kern_shutdown.c
@@ -1714,7 +1714,7 @@
void
dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh,
- char *magic, uint32_t archver, uint64_t dumplen)
+ const char *magic, uint32_t archver, uint64_t dumplen)
{
size_t dstsize;
Index: head/sys/kern/kern_sig.c
===================================================================
--- head/sys/kern/kern_sig.c
+++ head/sys/kern/kern_sig.c
@@ -3181,7 +3181,7 @@
* Kill the current process for stated reason.
*/
void
-killproc(struct proc *p, char *why)
+killproc(struct proc *p, const char *why)
{
PROC_LOCK_ASSERT(p, MA_OWNED);
Index: head/sys/kern/link_elf.c
===================================================================
--- head/sys/kern/link_elf.c
+++ head/sys/kern/link_elf.c
@@ -405,7 +405,7 @@
Elf_Size *ctors_sizep;
caddr_t modptr, baseptr, sizeptr;
elf_file_t ef;
- char *modname;
+ const char *modname;
linker_add_class(&link_elf_class);
Index: head/sys/sys/bufobj.h
===================================================================
--- head/sys/sys/bufobj.h
+++ head/sys/sys/bufobj.h
@@ -78,7 +78,7 @@
typedef void b_bdflush_t(struct bufobj *, struct buf *);
struct buf_ops {
- char *bop_name;
+ const char *bop_name;
b_write_t *bop_write;
b_strategy_t *bop_strategy;
b_sync_t *bop_sync;
Index: head/sys/sys/conf.h
===================================================================
--- head/sys/sys/conf.h
+++ head/sys/sys/conf.h
@@ -374,7 +374,7 @@
int dump_write(struct dumperinfo *, void *, vm_offset_t, off_t, size_t);
int dump_finish(struct dumperinfo *di, struct kerneldumpheader *kdh);
void dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh,
- char *magic, uint32_t archver, uint64_t dumplen);
+ const char *magic, uint32_t archver, uint64_t dumplen);
#endif /* _KERNEL */
Index: head/sys/sys/cons.h
===================================================================
--- head/sys/sys/cons.h
+++ head/sys/sys/cons.h
@@ -136,7 +136,7 @@
int cngetc(void);
void cngets(char *, size_t, int);
void cnputc(int);
-void cnputs(char *);
+void cnputs(const char *);
void cnputsn(const char *, size_t);
int cnunavailable(void);
void constty_set(struct tty *tp);
Index: head/sys/sys/signalvar.h
===================================================================
--- head/sys/sys/signalvar.h
+++ head/sys/sys/signalvar.h
@@ -384,7 +384,7 @@
int cursig(struct thread *td);
void execsigs(struct proc *p);
void gsignal(int pgid, int sig, ksiginfo_t *ksi);
-void killproc(struct proc *p, char *why);
+void killproc(struct proc *p, const char *why);
ksiginfo_t * ksiginfo_alloc(int wait);
void ksiginfo_free(ksiginfo_t *ksi);
int pksignal(struct proc *p, int sig, ksiginfo_t *ksi);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 22, 5:09 AM (7 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28932699
Default Alt Text
D23798.diff (4 KB)
Attached To
Mode
D23798: sys/kern: quiet -Wwrite-strings
Attached
Detach File
Event Timeline
Log In to Comment