summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/roken/getarg.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-01-12 18:16:45 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-03-27 11:51:27 +1100
commit89eaef025376339ef25d07cdc4748920fceaa968 (patch)
treef514f4632c9d54a372a7f1f0ca845a0c3a488fbf /source4/heimdal/lib/roken/getarg.c
parentfac8ca52ade6e490eea3cf3d0fc98287da321c13 (diff)
downloadsamba-89eaef025376339ef25d07cdc4748920fceaa968.tar.gz
samba-89eaef025376339ef25d07cdc4748920fceaa968.tar.bz2
samba-89eaef025376339ef25d07cdc4748920fceaa968.zip
s4:heimdal: import lorikeet-heimdal-201001120029 (commit a5e675fed7c5db8a7370b77ed0bfa724196aa84d)
Diffstat (limited to 'source4/heimdal/lib/roken/getarg.c')
-rw-r--r--source4/heimdal/lib/roken/getarg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/heimdal/lib/roken/getarg.c b/source4/heimdal/lib/roken/getarg.c
index 60b0f645af..d182f0019e 100644
--- a/source4/heimdal/lib/roken/getarg.c
+++ b/source4/heimdal/lib/roken/getarg.c
@@ -91,7 +91,7 @@ mandoc_template(struct getargs *args,
const char *extra_string,
char *(i18n)(const char *))
{
- int i;
+ size_t i;
char timestr[64], cmd[64];
char buf[128];
const char *p;
@@ -207,7 +207,7 @@ builtin_i18n(const char *str)
return rk_UNCONST(str);
}
-void ROKEN_LIB_FUNCTION
+ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
arg_printusage (struct getargs *args,
size_t num_args,
const char *progname,
@@ -217,7 +217,7 @@ arg_printusage (struct getargs *args,
progname, extra_string, builtin_i18n);
}
-void ROKEN_LIB_FUNCTION
+ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
arg_printusage_i18n (struct getargs *args,
size_t num_args,
const char *usage,
@@ -225,8 +225,7 @@ arg_printusage_i18n (struct getargs *args,
const char *extra_string,
char *(i18n)(const char *))
{
- int i;
- size_t max_len = 0;
+ size_t i, max_len = 0;
char buf[128];
int col = 0, columns;
struct winsize ws;
@@ -474,6 +473,7 @@ arg_match_long(struct getargs *args, size_t num_args,
default:
abort ();
+ UNREACHABLE(return 0);
}
/* not reached */
@@ -550,7 +550,7 @@ arg_match_short (struct getargs *args, size_t num_args,
return 0;
}
-int ROKEN_LIB_FUNCTION
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
getarg(struct getargs *args, size_t num_args,
int argc, char **argv, int *goptind)
{
@@ -562,7 +562,7 @@ getarg(struct getargs *args, size_t num_args,
#elif defined(HAVE_RANDOM)
srandom(time(NULL));
#else
- srand (time(NULL));
+ srand ((int) time(NULL));
#endif
(*goptind)++;
for(i = *goptind; i < argc; i++) {
@@ -586,7 +586,7 @@ getarg(struct getargs *args, size_t num_args,
return ret;
}
-void ROKEN_LIB_FUNCTION
+ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
free_getarg_strings (getarg_strings *s)
{
free (s->strings);