diff options
Diffstat (limited to 'hardinfo2/arch/linux/common')
| -rw-r--r-- | hardinfo2/arch/linux/common/alsa.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/battery.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/dmi.h | 4 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/loadavg.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/modules.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/os.h | 14 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/pci.h | 2 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/storage.h | 10 | ||||
| -rw-r--r-- | hardinfo2/arch/linux/common/uptime.h | 2 | 
9 files changed, 20 insertions, 20 deletions
| diff --git a/hardinfo2/arch/linux/common/alsa.h b/hardinfo2/arch/linux/common/alsa.h index 5609471c..ddd58edd 100644 --- a/hardinfo2/arch/linux/common/alsa.h +++ b/hardinfo2/arch/linux/common/alsa.h @@ -60,7 +60,7 @@ computer_get_alsainfo(void)  	ai->cards = g_slist_append(ai->cards, ac);  	g_strfreev(tmp); -	fgets(buffer, 128, cards);	/* skip next line */ +	(void)fgets(buffer, 128, cards);	/* skip next line */      }      fclose(cards); diff --git a/hardinfo2/arch/linux/common/battery.h b/hardinfo2/arch/linux/common/battery.h index 7dfa5423..d378fdef 100644 --- a/hardinfo2/arch/linux/common/battery.h +++ b/hardinfo2/arch/linux/common/battery.h @@ -217,7 +217,7 @@ __scan_battery_apm(void)      if ((procapm = fopen("/proc/apm", "r"))) {          int old_percentage = percentage; -        fscanf(procapm, "%s %s %s 0x%x %s %s %d%%", +        (void)fscanf(procapm, "%s %s %s 0x%x %s %s %d%%",                 apm_drv_ver, apm_bios_ver, trash,                 &ac_bat, trash, trash, &percentage);          fclose(procapm); diff --git a/hardinfo2/arch/linux/common/dmi.h b/hardinfo2/arch/linux/common/dmi.h index f69fdc21..34904ae5 100644 --- a/hardinfo2/arch/linux/common/dmi.h +++ b/hardinfo2/arch/linux/common/dmi.h @@ -70,7 +70,7 @@ gboolean dmi_get_info_dmidecode()        if ((dmi_pipe = popen(temp, "r"))) {          g_free(temp); -        fgets(buffer, 256, dmi_pipe); +        (void)fgets(buffer, 256, dmi_pipe);          if (pclose(dmi_pipe)) {            dmi_failed = TRUE;            break; @@ -120,7 +120,7 @@ gboolean dmi_get_info_sys()          continue;        if ((dmi_file = fopen(info->file, "r"))) { -        fgets(buffer, 256, dmi_file); +        (void)fgets(buffer, 256, dmi_file);          fclose(dmi_file);          dmi_info = h_strdup_cprintf("%s=%s\n", diff --git a/hardinfo2/arch/linux/common/loadavg.h b/hardinfo2/arch/linux/common/loadavg.h index 7c028679..ce2d8775 100644 --- a/hardinfo2/arch/linux/common/loadavg.h +++ b/hardinfo2/arch/linux/common/loadavg.h @@ -23,7 +23,7 @@ computer_get_loadinfo(void)      FILE *procloadavg;      procloadavg = fopen("/proc/loadavg", "r"); -    fscanf(procloadavg, "%f %f %f", &(li->load1), &(li->load5), +    (void)fscanf(procloadavg, "%f %f %f", &(li->load1), &(li->load5),  	   &(li->load15));      fclose(procloadavg); diff --git a/hardinfo2/arch/linux/common/modules.h b/hardinfo2/arch/linux/common/modules.h index 7ea238b7..78fb9de3 100644 --- a/hardinfo2/arch/linux/common/modules.h +++ b/hardinfo2/arch/linux/common/modules.h @@ -56,7 +56,7 @@ scan_modules_do(void)  	return;      } -    fgets(buffer, 1024, lsmod);	/* Discards the first line */ +    (void)fgets(buffer, 1024, lsmod);	/* Discards the first line */      while (fgets(buffer, 1024, lsmod)) {  	gchar *buf, *strmodule, *hashkey; diff --git a/hardinfo2/arch/linux/common/os.h b/hardinfo2/arch/linux/common/os.h index 01853123..cb90ea12 100644 --- a/hardinfo2/arch/linux/common/os.h +++ b/hardinfo2/arch/linux/common/os.h @@ -53,7 +53,7 @@ get_libc_version(void)      libc = popen("/lib/libc.so.6", "r");      if (!libc) goto err; -    fgets(buf, 256, libc); +    (void)fgets(buf, 256, libc);      if (pclose(libc)) goto err;      tmp = strstr(buf, "version "); @@ -80,7 +80,7 @@ get_os_compiled_date(void)      if (!procversion)  	return g_strdup("Unknown"); -    fgets(buf, 512, procversion); +    (void)fgets(buf, 512, procversion);      fclose(procversion);      return g_strdup(buf); @@ -103,7 +103,7 @@ detect_desktop_environment(OperatingSystem * os)  	   obtain the version. */  	version = popen("gnome-about --gnome-version", "r");  	if (version) { -	    fscanf(version, "Version: %s", vers); +	    (void)fscanf(version, "Version: %s", vers);  	    if (pclose(version))  	        goto unknown;  	} else { @@ -116,9 +116,9 @@ detect_desktop_environment(OperatingSystem * os)  	if (version) {  	    char buf[32]; -	    fgets(buf, 32, version); +	    (void)fgets(buf, 32, version); -	    fscanf(version, "KDE: %s", vers); +	    (void)fscanf(version, "KDE: %s", vers);  	    if (pclose(version))  	        goto unknown;  	} else { @@ -172,7 +172,7 @@ computer_get_os(void)  	release = popen("lsb_release -d", "r");  	if (release) { -            fgets(buffer, 128, release); +            (void)fgets(buffer, 128, release);              pclose(release);              os->distro = buffer; @@ -192,7 +192,7 @@ computer_get_os(void)  	    char buf[128];  	    distro_ver = fopen(distro_db[i].file, "r"); -	    fgets(buf, 128, distro_ver); +	    (void)fgets(buf, 128, distro_ver);  	    fclose(distro_ver);  	    buf[strlen(buf) - 1] = 0; diff --git a/hardinfo2/arch/linux/common/pci.h b/hardinfo2/arch/linux/common/pci.h index a1ea1021..73d87c7f 100644 --- a/hardinfo2/arch/linux/common/pci.h +++ b/hardinfo2/arch/linux/common/pci.h @@ -33,7 +33,7 @@ __scan_pci(void)  {      FILE *lspci;      gchar buffer[256], *buf, *strhash = NULL, *strdevice = NULL; -    gchar *category = NULL, *name = NULL, *icon, *lspci_path, *command_line; +    gchar *category = NULL, *name = NULL, *icon, *lspci_path, *command_line = NULL;      gint n = 0, x = 0;      if ((lspci_path = find_program("lspci")) == NULL) { diff --git a/hardinfo2/arch/linux/common/storage.h b/hardinfo2/arch/linux/common/storage.h index 5208f028..06593a09 100644 --- a/hardinfo2/arch/linux/common/storage.h +++ b/hardinfo2/arch/linux/common/storage.h @@ -180,7 +180,7 @@ __scan_ide_devices(void)  	    cache = 0;  	    proc_ide = fopen(device, "r"); -	    fgets(buf, 128, proc_ide); +	    (void)fgets(buf, 128, proc_ide);  	    fclose(proc_ide);  	    buf[strlen(buf) - 1] = 0; @@ -191,7 +191,7 @@ __scan_ide_devices(void)  	    device = g_strdup_printf("/proc/ide/hd%c/media", iface);  	    proc_ide = fopen(device, "r"); -	    fgets(buf, 128, proc_ide); +	    (void)fgets(buf, 128, proc_ide);  	    fclose(proc_ide);  	    buf[strlen(buf) - 1] = 0; @@ -257,7 +257,7 @@ __scan_ide_devices(void)  	    device = g_strdup_printf("/proc/ide/hd%c/cache", iface);  	    if (g_file_test(device, G_FILE_TEST_EXISTS)) {  		proc_ide = fopen(device, "r"); -		fscanf(proc_ide, "%d", &cache); +		(void)fscanf(proc_ide, "%d", &cache);  		fclose(proc_ide);  	    }  	    g_free(device); @@ -268,7 +268,7 @@ __scan_ide_devices(void)  		proc_ide = fopen(device, "r"); -		fgets(buf, 64, proc_ide); +		(void)fgets(buf, 64, proc_ide);  		for (tmp = buf; *tmp; tmp++) {  		    if (*tmp >= '0' && *tmp <= '9')  			break; @@ -276,7 +276,7 @@ __scan_ide_devices(void)  		pgeometry = g_strdup(g_strstrip(tmp)); -		fgets(buf, 64, proc_ide); +		(void)fgets(buf, 64, proc_ide);  		for (tmp = buf; *tmp; tmp++) {  		    if (*tmp >= '0' && *tmp <= '9')  			break; diff --git a/hardinfo2/arch/linux/common/uptime.h b/hardinfo2/arch/linux/common/uptime.h index b2412cd2..8fdc3a27 100644 --- a/hardinfo2/arch/linux/common/uptime.h +++ b/hardinfo2/arch/linux/common/uptime.h @@ -24,7 +24,7 @@ computer_get_uptime(void)      gulong minutes;      if ((procuptime = fopen("/proc/uptime", "r")) != NULL) { -	fscanf(procuptime, "%lu", &minutes); +	(void)fscanf(procuptime, "%lu", &minutes);  	ui->minutes = minutes / 60;  	fclose(procuptime);      } else { | 
