Xinqi Bao's Git

removed unnecessary typecasts (might be a reason for snd_mixer_selem_get_playback_vol...
[slstatus.git] / slstatus.c
index b0e3eef..5c7659c 100644 (file)
@@ -514,8 +514,8 @@ vol_perc(const char *soundcard)
        pcm_mixer = snd_mixer_find_selem(handle, vol_info);
        mas_mixer = snd_mixer_find_selem(handle, mute_info);
 
-       snd_mixer_selem_get_playback_volume_range((snd_mixer_elem_t *)pcm_mixer, &min, &max);
-       snd_mixer_selem_get_playback_volume((snd_mixer_elem_t *)pcm_mixer, SND_MIXER_SCHN_MONO, &vol);
+       snd_mixer_selem_get_playback_volume_range(pcm_mixer, &min, &max);
+       snd_mixer_selem_get_playback_volume(pcm_mixer, SND_MIXER_SCHN_MONO, &vol);
        snd_mixer_selem_get_playback_switch(mas_mixer, SND_MIXER_SCHN_MONO, &mute);
 
        if (vol_info)
@@ -607,20 +607,10 @@ int
 main(void)
 {
        size_t i;
-       char status_string[1024];
+       char status_string[4096];
        char *res, *element;
        struct arg argument;
 
-       /* get rid of unused functions warning */
-       if (0) { setstatus(""); battery_perc(""); cpu_perc();
-               datetime(""); disk_free(""); disk_perc("");
-               disk_total(""); disk_used(""); entropy();
-               gid(); hostname(); ip(""); load_avg();
-               ram_free(); ram_perc(); ram_used(); ram_total();
-               run_command(""); temp(""); uid(); uptime();
-               username(); vol_perc(""); wifi_perc("");
-               wifi_essid(""); }
-
        if (!(dpy = XOpenDisplay(0x0))) {
                fprintf(stderr, "Cannot open display!\n");
                exit(1);