Browse Source

Fix warninigs uncovered by llvm on OS X

Georgi Chorbadzhiyski 7 years ago
parent
commit
7732bfb6ef
4 changed files with 6 additions and 6 deletions
  1. 2
    2
      config.c
  2. 2
    2
      mptsd.c
  3. 1
    1
      network.c
  4. 1
    1
      output_psi.c

+ 2
- 2
config.c View File

@@ -403,7 +403,7 @@ int config_load_epg(CONFIG *conf) {
403 403
 
404 404
 extern char *program_id;
405 405
 
406
-static void show_usage() {
406
+static void show_usage(void) {
407 407
 	printf("%s\n", program_id);
408 408
 	puts(copyright);
409 409
 	puts("");
@@ -545,7 +545,7 @@ void config_load(CONFIG *conf, int argc, char **argv) {
545 545
 				break;
546 546
 			case 'H':
547 547
 			case 'h':
548
-				show_usage(0);
548
+				show_usage();
549 549
 				exit(0);
550 550
 				break;
551 551
 		}

+ 2
- 2
mptsd.c View File

@@ -134,7 +134,7 @@ void signal_quit(int sig) {
134 134
 	keep_going = 0;
135 135
 }
136 136
 
137
-void init_signals() {
137
+void init_signals(void) {
138 138
 	signal(SIGCHLD, SIG_IGN);
139 139
 	signal(SIGPIPE, SIG_IGN);
140 140
 
@@ -157,7 +157,7 @@ int main(int argc, char **argv) {
157 157
 	daemonize(config->pidfile);
158 158
 	web_server_start(config);
159 159
 	log_init(config->logident, config->syslog_active, config->pidfile == NULL, config->loghost, config->logport);
160
-	init_signals(config);
160
+	init_signals();
161 161
 
162 162
 	LOGf("INIT  : %s %s (%s)\n" , server_sig, server_ver, config->ident);
163 163
 

+ 1
- 1
network.c View File

@@ -170,7 +170,7 @@ int connect_source(INPUT *r, int retries, int readbuflen, int *http_code) {
170 170
 				regcomp(&http_response, "^HTTP/1.[0-1] (([0-9]{3}) .*)", REG_EXTENDED);
171 171
 				if (regexec(&http_response,buf,3,res,0) != REG_NOMATCH) {
172 172
 					char codestr[4];
173
-					if ((unsigned int)res[1].rm_eo-res[1].rm_so < sizeof(xresponse)) {
173
+					if ((unsigned int)res[1].rm_eo-res[1].rm_so < (unsigned int)sizeof(xresponse)) {
174 174
 						strncpy(xresponse, &buf[res[1].rm_so], res[1].rm_eo-res[1].rm_so);
175 175
 						xresponse[res[1].rm_eo-res[1].rm_so] = '\0';
176 176
 						chomp(xresponse);

+ 1
- 1
output_psi.c View File

@@ -96,7 +96,7 @@ static void output_psi_init_sdt(CONFIG *conf, OUTPUT *o) {
96 96
 }
97 97
 
98 98
 static void output_psi_init_tdt_tot(CONFIG *conf, OUTPUT *o) {
99
-	conf = conf; // Silence warning
99
+	(void)conf; // Silence warning
100 100
 	o->pid_tdt_cont = 15;
101 101
 	o->tdt = ts_tdt_alloc_init(time(NULL));
102 102
 	o->tot = ts_tot_alloc_init(time(NULL));

Loading…
Cancel
Save