mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	spa: silence two -Wformat-nonliteral warnings
In one we can duplicate the spa_asprintf call without real drawbacks. The second one can be split up without losing details. Note that there is another one in backend-native.c where splitting it up will make the code harder to understand. The warning for that one remains.
This commit is contained in:
		
							parent
							
								
									6a18272fed
								
							
						
					
					
						commit
						e55a5441b8
					
				
					 2 changed files with 8 additions and 6 deletions
				
			
		|  | @ -408,13 +408,13 @@ static bool rfcomm_send_volume_cmd(struct spa_source *source, int id) | |||
| 	rfcomm->volumes[id].hw_volume = hw_volume; | ||||
| 
 | ||||
| 	if (id == SPA_BT_VOLUME_ID_TX) | ||||
| 		format = "AT+VGM=%d"; | ||||
| 		format = "AT+VGM"; | ||||
| 	else if (id == SPA_BT_VOLUME_ID_RX) | ||||
| 		format = "AT+VGS=%d"; | ||||
| 		format = "AT+VGS"; | ||||
| 	else | ||||
| 	 	spa_assert_not_reached(); | ||||
| 
 | ||||
| 	rfcomm_send_cmd(rfcomm, format, hw_volume); | ||||
| 	rfcomm_send_cmd(rfcomm, "%s=%d", format, hw_volume); | ||||
| 
 | ||||
| 	return true; | ||||
| } | ||||
|  |  | |||
|  | @ -1159,11 +1159,13 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder * | |||
| 			name_and_codec = spa_aprintf("%s-%s", name, a2dp_codec->name); | ||||
| 			name = name_and_codec; | ||||
| 			if (profile == SPA_BT_PROFILE_A2DP_SINK && !a2dp_codec->duplex_codec) { | ||||
| 				desc = _("High Fidelity Playback (A2DP Sink, codec %s)"); | ||||
| 				desc_and_codec = spa_aprintf(_("High Fidelity Playback (A2DP Sink, codec %s)"), | ||||
| 							     a2dp_codec->description); | ||||
| 			} else { | ||||
| 				desc = _("High Fidelity Duplex (A2DP Source/Sink, codec %s)"); | ||||
| 				desc_and_codec = spa_aprintf(_("High Fidelity Duplex (A2DP Source/Sink, codec %s)"), | ||||
| 							     a2dp_codec->description); | ||||
| 
 | ||||
| 			} | ||||
| 			desc_and_codec = spa_aprintf(desc, a2dp_codec->description); | ||||
| 			desc = desc_and_codec; | ||||
| 		} else { | ||||
| 			if (profile == SPA_BT_PROFILE_A2DP_SINK) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Peter Hutterer
						Peter Hutterer