This fixes compilation on !linux
void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char *device, const char *mixer, int mixer_idx) {
char *outwalk = buffer;
+ int pbval = 1;
/* Printing volume only works with ALSA at the moment */
if (output_format == O_I3BAR) {
} else avg = (int)val;
/* Check for mute */
- int pbval;
if (snd_mixer_selem_has_playback_switch(hdl->elem)) {
if ((err = snd_mixer_selem_get_playback_switch(hdl->elem, 0, &pbval)) < 0)
fprintf (stderr, "i3status: ALSA: playback_switch: %s\n", snd_strerror(err));