summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-03 08:28:12 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-03 08:28:12 +0000
commit634c54310c92c48dd4eceec602e230a021bdcfc5 (patch)
tree9f5732a180b8daacf176e42511b0a72c972c7a4b /source3/rpcclient
parent47a7f0cfb5006fb41239a6cd81cce5e35fde750a (diff)
downloadsamba-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/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c2
-rw-r--r--source3/rpcclient/cmd_spoolss.c12
-rw-r--r--source3/rpcclient/rpcclient.h6
3 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 5c6308d07c..fbc4d49819 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -94,7 +94,7 @@ static void display_sam_user_info_21(SAM_USER_INFO_21 *usr)
}
}
-static char *display_time(NTTIME nttime)
+static const char *display_time(NTTIME nttime)
{
static fstring string;
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index c76e84580d..06da00748b 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -26,12 +26,12 @@
#include "rpcclient.h"
struct table_node {
- char *long_archi;
- char *short_archi;
+ const char *long_archi;
+ const char *short_archi;
int version;
};
-struct table_node archi_table[]= {
+static const struct table_node archi_table[]= {
{"Windows 4.0", "WIN40", 0 },
{"Windows NT x86", "W32X86", 2 },
@@ -45,7 +45,7 @@ struct table_node archi_table[]= {
function to do the mapping between the long architecture name and
the short one.
****************************************************************************/
-BOOL get_short_archi(char *short_archi, char *long_archi)
+BOOL get_short_archi(char *short_archi, const char *long_archi)
{
int i=-1;
@@ -1153,7 +1153,7 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch)
wrapper for strtok to get the next parameter from a delimited list.
Needed to handle the empty parameter string denoted by "NULL"
*************************************************************************/
-static char* get_driver_3_param (char* str, char* delim, UNISTR* dest)
+static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest)
{
char *ptr;
@@ -2135,7 +2135,7 @@ static NTSTATUS cmd_spoolss_enum_printerkey( struct cli_state *cli,
BOOL got_hnd = False;
pstring printername;
fstring servername, user;
- char *keyname = NULL;
+ const char *keyname = NULL;
POLICY_HND hnd;
uint16 *keylist = NULL, *curkey;
diff --git a/source3/rpcclient/rpcclient.h b/source3/rpcclient/rpcclient.h
index ae5b5f3c4f..3276a62437 100644
--- a/source3/rpcclient/rpcclient.h
+++ b/source3/rpcclient/rpcclient.h
@@ -23,12 +23,12 @@
#define RPCCLIENT_H
struct cmd_set {
- char *name;
+ const char *name;
NTSTATUS (*fn)(struct cli_state*, TALLOC_CTX *mem_ctx, int argc,
char **argv);
int pipe_idx;
- char *description;
- char *usage;
+ const char *description;
+ const char *usage;
};
#endif /* RPCCLIENT_H */