summaryrefslogtreecommitdiff
path: root/iceauth.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 16:15:19 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 16:17:53 -0700
commit2222cab2a3cc2615e7a3f2ec8665fdfcabc0436c (patch)
tree25bb7b93bcc5dd6e3c2c4d24123b4c2545a3931b /iceauth.c
parent2e692217544b8712d7bb41776cfd7f1bcca1070b (diff)
downloadiceauth-2222cab2a3cc2615e7a3f2ec8665fdfcabc0436c.tar.gz
More constification cleanup
Started by fixing gcc warning: iceauth.c:47:1: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] static char *defcmds[] = { "source", "-", NULL }; /* default command */ ^ and chasing down the rabbit hole of the functions the command line arguments can be passed through, until we came out the other side const clean. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'iceauth.c')
-rw-r--r--iceauth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iceauth.c b/iceauth.c
index dfd1269..926aec6 100644
--- a/iceauth.c
+++ b/iceauth.c
@@ -44,7 +44,7 @@ Bool break_locks = False; /* for error recovery */
*/
static char *authfilename = NULL; /* filename of cookie file */
-static char *defcmds[] = { "source", "-", NULL }; /* default command */
+static const char *defcmds[] = { "source", "-", NULL }; /* default command */
static int ndefcmds = 2;
static const char *defsource = "(stdin)";
@@ -87,7 +87,7 @@ main (int argc, char *argv[])
{
int i;
const char *sourcename = defsource;
- char **arglist = defcmds;
+ const char **arglist = defcmds;
int nargs = ndefcmds;
int status;
@@ -135,7 +135,7 @@ main (int argc, char *argv[])
} else {
sourcename = "(argv)";
nargs = argc - i;
- arglist = argv + i;
+ arglist = (const char **) argv + i;
if (verbose == -1) verbose = 0;
break;
}