diff options
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/options.c b/src/options.c index 95cb636..5e4ba4e 100644 --- a/src/options.c +++ b/src/options.c @@ -82,11 +82,11 @@ parse_gamma_string(const char *str, double gamma[3]) static int parse_transition_time(const char *str, const char **end) { - const char *min = NULL; + char *min = NULL; long hours, minutes; errno = 0; - hours = strtol(str, (char **)&min, 10); + hours = strtol(str, (void *)&min, 10); if (errno != 0 || min == str || min[0] != ':' || hours < 0 || hours >= 24) { return -1; @@ -94,7 +94,7 @@ parse_transition_time(const char *str, const char **end) min += 1; errno = 0; - minutes = strtol(min, (char **)end, 10); + minutes = strtol(min, (void *)end, 10); if (errno != 0 || *end == min || minutes < 0 || minutes >= 60) { return -1; } @@ -317,7 +317,7 @@ parse_command_line_option( int r; char *s; char *end; - char *provider_name; + const char *provider_name; switch (option) { case 'b': @@ -377,8 +377,7 @@ parse_command_line_option( } /* Lookup provider from name. */ - options->provider = find_location_provider( - location_providers, provider_name); + options->provider = find_location_provider(location_providers, provider_name); if (options->provider == NULL) { fprintf(stderr, _("Unknown location provider `%s'.\n"), provider_name); |