Forráskód Böngészése

Fixed compiler issues warnings over:
- switch over enum w/o complete list set or default
- int - pointer casts

Closes #SER-416.

Bogdan Pintea 16 éve
szülő
commit
ffa329ab3f

+ 6 - 0
modules_s/auth_radius/authorize.c

@@ -167,6 +167,12 @@ static inline int authenticate(struct sip_msg* msg, str* realm,
 	received = NULL;
 
 	switch(auth_api.pre_auth(msg, realm, hftype, &h, NULL)) {
+	default:
+		BUG("unexpected reply '%d'.\n", auth_api.pre_auth(msg, realm, hftype,
+				&h, NULL));
+#ifdef EXTRA_DEBUG
+		abort();
+#endif
 	case ERROR:
 	case BAD_CREDENTIALS:
 	    ret = -3;

+ 1 - 1
modules_s/speeddial/sdlookup.c

@@ -60,7 +60,7 @@ int sd_lookup(struct sip_msg* _msg, char* _index, char* _str2)
 	db_rec_t* rec;
 
 	/* init */
-	i = (int)_index;
+	i = (int)(long)_index;
 
 	     /* Retrieve the owner of the record */
 	if (get_from_uid(&uid, _msg) < 0) {

+ 1 - 1
modules_s/speeddial/speeddial.c

@@ -223,7 +223,7 @@ static int sd_lookup_fixup(void** param, int param_no)
 		}
 		ptr[tables_no].table = (char*)*param;
 		ptr[tables_no].lookup_num = NULL;
-		*param = (void*)tables_no;
+		*param = (void*)(long)tables_no;
 		tables_no++;
 		tables = ptr;
 	}