Przeglądaj źródła

add Falls Through comment hint to compiler to avoid warning

Mészáros Mihály 7 lat temu
rodzic
commit
a3b8cd59d1

+ 5 - 3
src/apps/uclient/mainuclient.c

@@ -328,13 +328,15 @@ int main(int argc, char **argv)
 			passive_tcp = 1;
 			/* implies 'T': */
 			/* no break */
+			/* Falls through. */
 		case 'T':
 			relay_transport = STUN_ATTRIBUTE_TRANSPORT_TCP_VALUE;
 			break;
 		case 'U':
-		  use_null_cipher = 1;
-		  /* implies 'S' */
-		  /* no break */
+			use_null_cipher = 1;
+			/* implies 'S' */
+			/* no break */
+			/* Falls through. */
 		case 'S':
 			use_secure = 1;
 			break;

+ 6 - 0
src/apps/uclient/uclient.c

@@ -261,6 +261,7 @@ int send_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int data_con
 					TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,"Socket write error 111.666: \n");
 					if (handle_socket_error())
 						break;
+					/* Falls through. */
 				case SSL_ERROR_SSL:
 				{
 					TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "SSL write error: \n");
@@ -270,6 +271,7 @@ int send_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int data_con
 						ERR_error_string(ERR_get_error(),buf),
 						SSL_get_error(ssl, len));
 				}
+				/* Falls through. */
 				default:
 					clnet_info->broken = 1;
 					TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,"Unexpected error while writing!\n");
@@ -457,6 +459,7 @@ int recv_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int sync, in
 							"Socket read error 111.999: \n");
 					if (handle_socket_error())
 						break;
+					/* Falls through. */
 				case SSL_ERROR_SSL: {
 					TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "SSL write error: \n");
 					char buf[1024];
@@ -464,6 +467,7 @@ int recv_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int sync, in
 							ERR_error_string(ERR_get_error(), buf),
 							SSL_get_error(ssl, rc));
 				}
+				/* Falls through. */
 				default:
 					clnet_info->broken = 1;
 					TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,
@@ -525,6 +529,7 @@ int recv_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int sync, in
 							"Socket read error 111.999: \n");
 					if (handle_socket_error())
 						break;
+					/* Falls through. */
 				case SSL_ERROR_SSL: {
 					TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "SSL write error: \n");
 					char buf[1024];
@@ -532,6 +537,7 @@ int recv_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int sync, in
 							ERR_error_string(ERR_get_error(), buf),
 							SSL_get_error(ssl, rc));
 				}
+				/* Falls through. */
 				default:
 					clnet_info->broken = 1;
 					TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,

+ 1 - 0
src/server/ns_turn_server.c

@@ -1152,6 +1152,7 @@ static int handle_turn_allocate(turn_turnserver *server,
 					*reason = (const u08bits *)"Even Port cannot be used with Dual Allocation";
 					break;
 				}
+				/* Falls through. */
 			case STUN_ATTRIBUTE_REQUESTED_ADDRESS_FAMILY: {
 				if(in_reservation_token) {
 					*err_code = 400;