diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-01-03 08:28:12 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-01-03 08:28:12 +0000 |
commit | 634c54310c92c48dd4eceec602e230a021bdcfc5 (patch) | |
tree | 9f5732a180b8daacf176e42511b0a72c972c7a4b /source3/include | |
parent | 47a7f0cfb5006fb41239a6cd81cce5e35fde750a (diff) | |
download | samba-634c54310c92c48dd4eceec602e230a021bdcfc5.tar.gz samba-634c54310c92c48dd4eceec602e230a021bdcfc5.tar.bz2 samba-634c54310c92c48dd4eceec602e230a021bdcfc5.zip |
Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings. (Adds a lot of const).
Andrew Bartlett
(This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/auth.h | 6 | ||||
-rw-r--r-- | source3/include/includes.h | 2 | ||||
-rw-r--r-- | source3/include/mapping.h | 4 | ||||
-rw-r--r-- | source3/include/ntdomain.h | 4 | ||||
-rw-r--r-- | source3/include/passdb.h | 2 | ||||
-rw-r--r-- | source3/include/rpc_dce.h | 4 | ||||
-rw-r--r-- | source3/include/rpc_reg.h | 2 | ||||
-rw-r--r-- | source3/include/smb.h | 34 |
8 files changed, 29 insertions, 29 deletions
diff --git a/source3/include/auth.h b/source3/include/auth.h index 66b317d643..846662d17c 100644 --- a/source3/include/auth.h +++ b/source3/include/auth.h @@ -100,7 +100,7 @@ struct auth_context { DATA_BLOB challenge; /* Who set this up in the first place? */ - char *challenge_set_by; + const char *challenge_set_by; struct auth_methods *challenge_set_method; /* What order are the various methods in? Try to stop it changing under us */ @@ -118,7 +118,7 @@ struct auth_context { typedef struct auth_methods { struct auth_methods *prev, *next; - char *name; /* What name got this module */ + const char *name; /* What name got this module */ NTSTATUS (*auth)(const struct auth_context *auth_context, void *my_private_data, @@ -144,7 +144,7 @@ typedef struct auth_methods typedef NTSTATUS (*auth_init_function)(struct auth_context *, const char *, struct auth_methods **); struct auth_init_function_entry { - char *name; + const char *name; /* Function to create a member of the authmethods list */ auth_init_function init; diff --git a/source3/include/includes.h b/source3/include/includes.h index 391d1bf1f9..7900c8a3a3 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -793,7 +793,7 @@ typedef struct smb_wpasswd { /* used in net.c */ struct functable { - char *funcname; + const char *funcname; int (*fn)(int argc, const char **argv); }; diff --git a/source3/include/mapping.h b/source3/include/mapping.h index d2fb89d1de..d4f2d28e6a 100644 --- a/source3/include/mapping.h +++ b/source3/include/mapping.h @@ -55,7 +55,7 @@ typedef struct _GROUP_MAP { typedef struct _PRIVS { uint32 se_priv; - char *priv; - char *description; + const char *priv; + const char *description; } PRIVS; diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 628035885e..cf5bb5046c 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -331,7 +331,7 @@ typedef struct smb_np_struct struct api_struct { - char *name; + const char *name; uint8 opnum; BOOL (*fn) (pipes_struct *); }; @@ -339,7 +339,7 @@ struct api_struct typedef struct { uint32 rid; - char *name; + const char *name; } rid_name; diff --git a/source3/include/passdb.h b/source3/include/passdb.h index f63fd52e84..fa80b263ff 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -153,7 +153,7 @@ typedef NTSTATUS (*pdb_init_function)(struct pdb_context *, const char *); struct pdb_init_function_entry { - char *name; + const char *name; /* Function to create a member of the pdb_methods list */ pdb_init_function init; }; diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 3e615dab80..031f7de6d7 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -119,10 +119,10 @@ struct pipe_id_info { /* the names appear not to matter: the syntaxes _do_ matter */ - char *client_pipe; + const char *client_pipe; RPC_IFACE abstr_syntax; /* this one is the abstract syntax id */ - char *server_pipe; /* this one is the secondary syntax name */ + const char *server_pipe; /* this one is the secondary syntax name */ RPC_IFACE trans_syntax; /* this one is the primary syntax id */ }; diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 92175cf287..9ab24e30c6 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -129,7 +129,7 @@ typedef struct { } REGISTRY_OPS; typedef struct { - char *keyname; /* full path to name of key */ + const char *keyname; /* full path to name of key */ REGISTRY_OPS *ops; /* registry function hooks */ } REGISTRY_HOOK; diff --git a/source3/include/smb.h b/source3/include/smb.h index b389020e23..60ab6be29a 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -651,19 +651,19 @@ typedef struct sam_passwd time_t pass_can_change_time; /* password can change time */ time_t pass_must_change_time; /* password must change time */ - char * username; /* UNIX username string */ - char * domain; /* Windows Domain name */ - char * nt_username; /* Windows username string */ - char * full_name; /* user's full name string */ - char * unix_home_dir; /* UNIX home directory string */ - char * home_dir; /* home directory string */ - char * dir_drive; /* home directory drive string */ - char * logon_script; /* logon script string */ - char * profile_path; /* profile path string */ - char * acct_desc ; /* user description string */ - char * workstations; /* login from workstations string */ - char * unknown_str ; /* don't know what this is, yet. */ - char * munged_dial ; /* munged path name and dial-back tel number */ + const char * username; /* UNIX username string */ + const char * domain; /* Windows Domain name */ + const char * nt_username; /* Windows username string */ + const char * full_name; /* user's full name string */ + const char * unix_home_dir; /* UNIX home directory string */ + const char * home_dir; /* home directory string */ + const char * dir_drive; /* home directory drive string */ + const char * logon_script; /* logon script string */ + const char * profile_path; /* profile path string */ + const char * acct_desc ; /* user description string */ + const char * workstations; /* login from workstations string */ + const char * unknown_str ; /* don't know what this is, yet. */ + const char * munged_dial ; /* munged path name and dial-back tel number */ uid_t uid; /* this is a unix uid_t */ gid_t gid; /* this is a unix gid_t */ @@ -775,7 +775,7 @@ enum brl_type {READ_LOCK, WRITE_LOCK}; struct enum_list { int value; - char *name; + const char *name; }; #define BRLOCK_FN_CAST() \ @@ -788,12 +788,12 @@ struct enum_list { br_off start, br_off size) struct parm_struct { - char *label; + const char *label; parm_type type; parm_class class; void *ptr; - BOOL (*special)(char *, char **); - struct enum_list *enum_list; + BOOL (*special)(const char *, char **); + const struct enum_list *enum_list; unsigned flags; union { BOOL bvalue; |