Skip to content

Commit

Permalink
Fix warninigs uncovered by llvm on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Chorbadzhiyski committed Oct 11, 2016
1 parent 9b53fba commit 7732bfb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ int config_load_epg(CONFIG *conf) {

extern char *program_id;

static void show_usage() {
static void show_usage(void) {
printf("%s\n", program_id);
puts(copyright);
puts("");
Expand Down Expand Up @@ -545,7 +545,7 @@ void config_load(CONFIG *conf, int argc, char **argv) {
break;
case 'H':
case 'h':
show_usage(0);
show_usage();
exit(0);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions mptsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void signal_quit(int sig) {
keep_going = 0;
}

void init_signals() {
void init_signals(void) {
signal(SIGCHLD, SIG_IGN);
signal(SIGPIPE, SIG_IGN);

Expand All @@ -157,7 +157,7 @@ int main(int argc, char **argv) {
daemonize(config->pidfile);
web_server_start(config);
log_init(config->logident, config->syslog_active, config->pidfile == NULL, config->loghost, config->logport);
init_signals(config);
init_signals();

LOGf("INIT : %s %s (%s)\n" , server_sig, server_ver, config->ident);

Expand Down
2 changes: 1 addition & 1 deletion network.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ int connect_source(INPUT *r, int retries, int readbuflen, int *http_code) {
regcomp(&http_response, "^HTTP/1.[0-1] (([0-9]{3}) .*)", REG_EXTENDED);
if (regexec(&http_response,buf,3,res,0) != REG_NOMATCH) {
char codestr[4];
if ((unsigned int)res[1].rm_eo-res[1].rm_so < sizeof(xresponse)) {
if ((unsigned int)res[1].rm_eo-res[1].rm_so < (unsigned int)sizeof(xresponse)) {
strncpy(xresponse, &buf[res[1].rm_so], res[1].rm_eo-res[1].rm_so);
xresponse[res[1].rm_eo-res[1].rm_so] = '\0';
chomp(xresponse);
Expand Down
2 changes: 1 addition & 1 deletion output_psi.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static void output_psi_init_sdt(CONFIG *conf, OUTPUT *o) {
}

static void output_psi_init_tdt_tot(CONFIG *conf, OUTPUT *o) {
conf = conf; // Silence warning
(void)conf; // Silence warning
o->pid_tdt_cont = 15;
o->tdt = ts_tdt_alloc_init(time(NULL));
o->tot = ts_tot_alloc_init(time(NULL));
Expand Down

0 comments on commit 7732bfb

Please sign in to comment.