Snippets for acpitool 0.5.1 from Nix x86_64-linux
Sourced from https://hydra.nixos.org/log/sfyl40bmjs9xgfynj2zypb5wynqfabnh-acpitool-0.5.1.drv.
-
acpitool.cpp:69:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 69 | filename = "/proc/acpi/info"; | ^~~~~~~~~~~~~~~~~ -
acpitool.cpp:70:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 70 | filename2 = "/sys/module/acpi/parameters/acpica_version"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
acpitool.cpp:142:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 142 | filename = "/proc/sys/kernel/osrelease"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
acpitool.cpp:190:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 190 | filename = "/proc/sys/kernel/osrelease"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
acpitool.cpp:231:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 231 | dirname = "/proc/acpi/thermal_zone/"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -
acpitool.cpp:365:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 365 | dirname = "/proc/acpi/fan/"; | ^~~~~~~~~~~~~~~~~ -
acpitool.cpp:422:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 422 | filename = "/proc/acpi/wakeup"; | ^~~~~~~~~~~~~~~~~~~ -
acpitool.cpp:467:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 467 | filename = "/proc/acpi/wakeup"; | ^~~~~~~~~~~~~~~~~~~ -
acpitool.cpp:534:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 534 | filename = "/proc/acpi/sleep"; // nice default values // | ^~~~~~~~~~~~~~~~~~ -
acpitool.cpp:535:11: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 535 | str = "3"; | ^~~ -
acpitool.cpp:541:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 541 | filename = "/sys/power/state"; | ^~~~~~~~~~~~~~~~~~ -
acpitool.cpp:542:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 542 | str = "mem"; | ^~~~~ -
acpitool.cpp:545:38: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 545 | case 4 : if(Kernel_24) str = "4"; | ^~~ -
acpitool.cpp:548:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 548 | filename = "/sys/power/state"; | ^~~~~~~~~~~~~~~~~~ -
acpitool.cpp:549:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 549 | str = "disk"; | ^~~~~~ -
acpitool.cpp:107:1: warning: control reaches end of non-void function [-Wreturn-type] 107 | } | ^ -
acpitool.cpp:323:30: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 323 | fgets(str, 120, fp); | ~~~~~^~~~~~~~~~~~~~ -
acpitool.cpp:374:70: warning: '%s' directive writing up to 255 bytes into a region of size 185 [-Wformat-overflow=] 374 | sprintf(filename[fan_count], "/proc/acpi/fan/%s/state", name); | ^~ -
acpitool.cpp:254:90: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 231 [-Wformat-truncation=] 254 | snprintf(tmp_fname, sizeof (tmp_fname) - 1, "/proc/acpi/thermal_zone/%s/state", name); | ^~ -
acpitool.cpp:257:90: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 231 [-Wformat-truncation=] 257 | snprintf(tmp_fname, sizeof (tmp_fname) - 1, "/proc/acpi/thermal_zone/%s/temperature", name); | ^~ -
acpitool.cpp:260:90: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 231 [-Wformat-truncation=] 260 | snprintf(tmp_fname, sizeof (tmp_fname) - 1, "/proc/acpi/thermal_zone/%s/trip_points", name); | ^~ -
ac_adapter.cpp:62:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 62 | dirname = "/proc/acpi/ac_adapter/"; | ^~~~~~~~~~~~~~~~~~~~~~~~ -
ac_adapter.cpp:99:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 99 | dirname = "/proc/acpi/ac_adapter/"; | ^~~~~~~~~~~~~~~~~~~~~~~~ -
ac_adapter.cpp:157:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 157 | dirname = "/sys/class/power_supply/"; //find all entries in this dir | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -
ac_adapter.cpp:183:27: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 183 | fscanf(temp_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~ -
ac_adapter.cpp:219:26: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 219 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
ac_adapter.cpp:176:56: warning: '%s' directive writing up to 255 bytes into a region of size 76 [-Wformat-overflow=] 176 | sprintf(temp, "/sys/class/power_supply/%s/type", name); | ^~ -
ac_adapter.cpp:189:77: warning: '%s' directive writing up to 255 bytes into a region of size 106 [-Wformat-overflow=] 189 | sprintf(filename[findex], "/sys/class/power_supply/%s/uevent", name); | ^~ -
ac_adapter.cpp:108:64: warning: '%s' directive writing up to 255 bytes into a region of size 178 [-Wformat-overflow=] 108 | sprintf(filename[ac_count], "/proc/acpi/ac_adapter/%s/state", name); | ^~ -
ac_adapter.cpp:71:64: warning: '%s' directive writing up to 255 bytes into a region of size 178 [-Wformat-overflow=] 71 | sprintf(filename[ac_count], "/proc/acpi/ac_adapter/%s/state", name); | ^~ -
toshiba.cpp:50:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 50 | filename = "/proc/acpi/toshiba"; | ^~~~~~~~~~~~~~~~~~~~ -
toshiba.cpp:87:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 87 | filename = "/proc/acpi/toshiba/fan"; | ^~~~~~~~~~~~~~~~~~~~~~~~ -
toshiba.cpp:137:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 137 | filename = "/proc/acpi/toshiba/lcd"; | ^~~~~~~~~~~~~~~~~~~~~~~~ -
toshiba.cpp:171:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 171 | filename = "/proc/acpi/toshiba/fan"; | ^~~~~~~~~~~~~~~~~~~~~~~~ -
toshiba.cpp:205:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 205 | filename = "/proc/acpi/toshiba/lcd"; | ^~~~~~~~~~~~~~~~~~~~~~~~ -
toshiba.cpp:236:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 236 | filename = "/proc/acpi/toshiba/video"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -
asus.cpp:50:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 50 | filename = "/proc/acpi/asus"; | ^~~~~~~~~~~~~~~~~ -
asus.cpp:87:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 87 | filename = "/proc/acpi/asus/brn"; | ^~~~~~~~~~~~~~~~~~~~~ -
asus.cpp:121:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 121 | filename = "/proc/acpi/asus/brn"; | ^~~~~~~~~~~~~~~~~~~~~ -
asus.cpp:149:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 149 | filename = "/proc/acpi/asus/disp"; | ^~~~~~~~~~~~~~~~~~~~~~ -
asus.cpp:204:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 204 | filename = "/proc/acpi/asus/info"; | ^~~~~~~~~~~~~~~~~~~~~~ -
asus.cpp:268:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 268 | filename = "/proc/acpi/asus/lcd"; | ^~~~~~~~~~~~~~~~~~~~~ -
asus.cpp:293:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 293 | filename = "/proc/acpi/asus/mled"; | ^~~~~~~~~~~~~~~~~~~~~~ -
asus.cpp:318:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 318 | filename = "/proc/acpi/asus/wled"; | ^~~~~~~~~~~~~~~~~~~~~~ -
thinkpad.cpp:17:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 17 | filename = "/proc/acpi/ibm"; | ^~~~~~~~~~~~~~~~ -
thinkpad.cpp:38:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 38 | filename = "/proc/acpi/ibm/bay"; | ^~~~~~~~~~~~~~~~~~~~ -
thinkpad.cpp:59:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 59 | filename = "/proc/acpi/ibm/brightness"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -
thinkpad.cpp:85:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 85 | filename = "/proc/acpi/ibm/fan"; | ^~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:107:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 107 | dirname = "/proc/acpi/processor/"; //find all entries in this dir // | ^~~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:64:45: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 64 | for(int t=0; t<4; t++) fgets(str, 299, cpuinfo_fp); // skip 4 lines // | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:65:22: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 65 | fgets(str, 299, cpuinfo_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:69:22: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 69 | fgets(str, 299, cpuinfo_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:70:22: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 70 | fgets(str, 299, cpuinfo_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:81:22: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 81 | fgets(str, 299, cpuinfo_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:86:45: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 86 | for(int t=0; t<5; t++) fgets(str, 299, cpuinfo_fp); // we can skip at least 5 lines to reach Bogomips line// | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:90:26: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 90 | fgets(str, 299, cpuinfo_fp); // different for Amd64, Opteron, Core Duo, P4 with Ht, ... // | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:213:38: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 213 | fgets(str, 100, power_fp); // active state | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:220:38: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 220 | fgets(str, 100, power_fp); // max_cstate | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:229:38: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 229 | fgets(str, 100, power_fp); // bus master activity | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:236:38: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 236 | fgets(str, 100, power_fp); // states (line contains no information) | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:239:46: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 239 | fgets(str, 130, power_fp); // cstate Cx | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:285:42: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 285 | fgets(str, 100, throt_fp); // active state | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
cpu.cpp:289:42: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 289 | fgets(str, 100, throt_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
battery.cpp:360:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 360 | dirname = "/proc/acpi/battery/"; //find all entries in this dir | ^~~~~~~~~~~~~~~~~~~~~ -
battery.cpp:543:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 543 | dirname = "/sys/class/power_supply/"; //find all entries in this dir | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -
battery.cpp:749:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 749 | dirname = "/proc/acpi/battery/"; | ^~~~~~~~~~~~~~~~~~~~~ -
battery.cpp:798:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 798 | dirname = "/sys/class/power_supply/"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -
battery.cpp:575:27: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 575 | fscanf(temp_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~ -
battery.cpp:656:22: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 656 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ -
battery.cpp:844:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 844 | fscanf(powertype_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ -
battery.cpp:817:68: warning: '%s' directive writing up to 255 bytes into a region of size 236 [-Wformat-overflow=] 817 | sprintf(filename[findex], "/sys/class/power_supply/%s/type", name); | ^~ -
battery.cpp:567:56: warning: '%s' directive writing up to 255 bytes into a region of size 76 [-Wformat-overflow=] 567 | sprintf(temp, "/sys/class/power_supply/%s/type", name); | ^~ -
battery.cpp:385:67: warning: '%s' directive writing up to 255 bytes into a region of size 241 [-Wformat-overflow=] 385 | sprintf(filename[findex], "/proc/acpi/battery/%s/info", name); | ^~ -
battery.cpp:389:67: warning: '%s' directive writing up to 255 bytes into a region of size 176 [-Wformat-overflow=] 389 | sprintf(filename[findex], "/proc/acpi/battery/%s/state", name); | ^~ -
freq.cpp:97:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 97 | fscanf(freqinfo_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ -
freq.cpp:121:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 121 | fscanf(freqinfo_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ -
freq.cpp:144:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 144 | fscanf(freqinfo_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ -
freq.cpp:166:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 166 | fscanf(freqinfo_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ -
freq.cpp:189:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 189 | fscanf(freqinfo_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~