mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	fix switch fallthrough cases
This commit is contained in:
		
							parent
							
								
									9573b24e52
								
							
						
					
					
						commit
						7cd55c2c6b
					
				
					 3 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -232,7 +232,7 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser,
 | 
				
			||||||
				return -EINVAL;
 | 
									return -EINVAL;
 | 
				
			||||||
			if (--parser->depth < 0)
 | 
								if (--parser->depth < 0)
 | 
				
			||||||
				return -EINVAL;
 | 
									return -EINVAL;
 | 
				
			||||||
 | 
								/* fallthrough */
 | 
				
			||||||
		case '}':
 | 
							case '}':
 | 
				
			||||||
			it = &parser->iter[parser->depth];
 | 
								it = &parser->iter[parser->depth];
 | 
				
			||||||
			current = spa_pod_iter_current(it);
 | 
								current = spa_pod_iter_current(it);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -476,6 +476,7 @@ impl_node_port_enum_params(struct spa_node *node,
 | 
				
			||||||
					SPA_PARAM_LIST_id, &SPA_POD_Id(list[*index]), 0);
 | 
										SPA_PARAM_LIST_id, &SPA_POD_Id(list[*index]), 0);
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			return 0;
 | 
								return 0;
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	case SPA_PARAM_EnumFormat:
 | 
						case SPA_PARAM_EnumFormat:
 | 
				
			||||||
		if ((res = port_enum_formats(node, direction, port_id, index, ¶m, &b)) <= 0)
 | 
							if ((res = port_enum_formats(node, direction, port_id, index, ¶m, &b)) <= 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -225,10 +225,12 @@ static int do_negotiate(struct pw_link *this, uint32_t in_state, uint32_t out_st
 | 
				
			||||||
		case -EIO:
 | 
							case -EIO:
 | 
				
			||||||
			current = NULL;
 | 
								current = NULL;
 | 
				
			||||||
			res = 0;
 | 
								res = 0;
 | 
				
			||||||
 | 
								/* fallthrough */
 | 
				
			||||||
		case 1:
 | 
							case 1:
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case 0:
 | 
							case 0:
 | 
				
			||||||
			res = -EBADF;
 | 
								res = -EBADF;
 | 
				
			||||||
 | 
								/* fallthrough */
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			asprintf(&error, "error get output format: %s", spa_strerror(res));
 | 
								asprintf(&error, "error get output format: %s", spa_strerror(res));
 | 
				
			||||||
			goto error;
 | 
								goto error;
 | 
				
			||||||
| 
						 | 
					@ -258,10 +260,12 @@ static int do_negotiate(struct pw_link *this, uint32_t in_state, uint32_t out_st
 | 
				
			||||||
		case -EIO:
 | 
							case -EIO:
 | 
				
			||||||
			current = NULL;
 | 
								current = NULL;
 | 
				
			||||||
			res = 0;
 | 
								res = 0;
 | 
				
			||||||
 | 
								/* fallthrough */
 | 
				
			||||||
		case 1:
 | 
							case 1:
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case 0:
 | 
							case 0:
 | 
				
			||||||
			res = -EBADF;
 | 
								res = -EBADF;
 | 
				
			||||||
 | 
								/* fallthrough */
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			asprintf(&error, "error get input format: %s", spa_strerror(res));
 | 
								asprintf(&error, "error get input format: %s", spa_strerror(res));
 | 
				
			||||||
			goto error;
 | 
								goto error;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue