mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	alsa: Fix compile warnings
modules/alsa/alsa-sink.c: In function ‘pa_alsa_sink_new’:
modules/alsa/alsa-sink.c:2603:15: warning: declaration of ‘state’ shadows a previous local [-Wshadow]
         void *state;
               ^~~~~
modules/alsa/alsa-sink.c:2270:11: note: shadowed declaration is here
     void *state = NULL;
           ^~~~~
  CC       modules/alsa/module_alsa_sink_la-module-alsa-sink.lo
modules/alsa/alsa-source.c: In function ‘pa_alsa_source_new’:
modules/alsa/alsa-source.c:2289:15: warning: declaration of ‘state’ shadows a previous local [-Wshadow]
         void *state;
               ^~~~~
modules/alsa/alsa-source.c:1975:11: note: shadowed declaration is here
     void *state = NULL;
           ^~~~~
modules/alsa/module-alsa-card.c: In function ‘prune_singleton_availability_groups’:
modules/alsa/module-alsa-card.c:691:71: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
             pa_hashmap_put(group_counts, p->availability_group, count + 1);
                                                                       ^
			
			
This commit is contained in:
		
							parent
							
								
									eaa6d5d6c1
								
							
						
					
					
						commit
						e99e862a3d
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1972,7 +1972,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
 | 
			
		|||
    bool volume_is_set;
 | 
			
		||||
    bool mute_is_set;
 | 
			
		||||
    pa_alsa_profile_set *profile_set = NULL;
 | 
			
		||||
    void *state = NULL;
 | 
			
		||||
    void *state;
 | 
			
		||||
 | 
			
		||||
    pa_assert(m);
 | 
			
		||||
    pa_assert(ma);
 | 
			
		||||
| 
						 | 
				
			
			@ -2250,6 +2250,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
 | 
			
		|||
        pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_NAME, mapping->name);
 | 
			
		||||
        pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, mapping->description);
 | 
			
		||||
 | 
			
		||||
        state = NULL;
 | 
			
		||||
        while ((key = pa_proplist_iterate(mapping->proplist, &state)))
 | 
			
		||||
            pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -2286,7 +2287,6 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
 | 
			
		|||
 | 
			
		||||
    if (u->ucm_context) {
 | 
			
		||||
        pa_device_port *port;
 | 
			
		||||
        void *state;
 | 
			
		||||
        unsigned h_prio = 0;
 | 
			
		||||
        PA_HASHMAP_FOREACH(port, u->source->ports, state) {
 | 
			
		||||
            if (!h_prio || port->priority > h_prio)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue