D: [iurt_root_command] chroot warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend. Installing /home/iurt/rpmbuild/SRPMS/acpitool-0.5.1-11.mga9.src.rpm Building target platforms: aarch64 Building for target aarch64 Executing(%prep): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.Aojacn + umask 022 + cd /home/iurt/rpmbuild/BUILD + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + cd /home/iurt/rpmbuild/BUILD + rm -rf acpitool-0.5.1 + /usr/bin/bzip2 -dc /home/iurt/rpmbuild/SOURCES/acpitool-0.5.1.tar.bz2 + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd acpitool-0.5.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.Fem5IO + umask 022 + cd /home/iurt/rpmbuild/BUILD + cd acpitool-0.5.1 + '[' 1 -eq 1 ']' + '[' 1 -eq 1 ']' + autoreconf -vfi autoreconf: export WARNINGS= autoreconf: warning: autoconf input should be named 'configure.ac', not 'configure.in' autoreconf: Entering directory '.' autoreconf: configure.in: not using Gettext autoreconf: running: aclocal --force aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in' autoreconf: configure.in: tracing autoreconf: configure.in: not using Libtool autoreconf: configure.in: not using Intltool autoreconf: configure.in: not using Gtkdoc autoreconf: running: /usr/bin/autoconf --force configure.in:3: warning: 'AM_CONFIG_HEADER': this macro is obsolete. configure.in:3: You should use the 'AC_CONFIG_HEADERS' macro instead. ./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from... aclocal.m4:745: AM_CONFIG_HEADER is expanded from... configure.in:3: the top level configure.in:4: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. ./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from... aclocal.m4:429: AM_INIT_AUTOMAKE is expanded from... configure.in:4: the top level configure.in:30: warning: AC_OUTPUT should be used without arguments. configure.in:30: You should run autoupdate. autoreconf: running: /usr/bin/autoheader --force autoheader: warning: autoconf input should be named 'configure.ac', not 'configure.in' autoreconf: running: automake --add-missing --copy --force-missing automake: warning: autoconf input should be named 'configure.ac', not 'configure.in' configure.in:4: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see: configure.in:4: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation configure.in:10: installing './compile' automake: warning: autoconf input should be named 'configure.ac', not 'configure.in' autoreconf: Leaving directory '.' + CFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables' + export CFLAGS + CXXFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables' + export CXXFLAGS + FFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables ' + export FFLAGS + FCFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables ' + export FCFLAGS + LDFLAGS=' -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CONFIGURE_TOP=. + '[' 1 = 1 ']' ++ find . -name config.guess -o -name config.sub + for i in $(find ${CONFIGURE_TOP} -name config.guess -o -name config.sub) ++ basename ./config.sub + '[' -f /usr/lib/rpm/mageia/config.sub ']' ++ basename ./config.sub + cp -af /usr/lib/rpm/mageia/config.sub ./config.sub + for i in $(find ${CONFIGURE_TOP} -name config.guess -o -name config.sub) ++ basename ./config.guess + '[' -f /usr/lib/rpm/mageia/config.guess ']' ++ basename ./config.guess + cp -af /usr/lib/rpm/mageia/config.guess ./config.guess + /usr/lib/rpm/mageia/force-as-needed-for-shared-lib-in-libtool Forcing -Wl,--as-needed in configure/libtool to workaround libtool bug (cf http://lists.gnu.org/archive/html/libtool-patches/2004-06/msg00002.html) + /usr/lib/rpm/mageia/drop-ld-no-undefined-for-shared-lib-modules-in-libtool + /usr/lib/rpm/mageia/fix-libtool-ltmain-from-overlinking + /usr/lib/rpm/mageia/fix-libtool-from-moving-options-after-libs . + /usr/lib/rpm/mageia/fix-dlsearch-path-in-libtool-for-multilib . lib64 + ./configure --host=aarch64-mageia-linux-gnu --build=aarch64-mageia-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... aarch64-mageia-linux-gnu checking host system type... aarch64-mageia-linux-gnu checking for aarch64-mageia-linux-gnu-g++... no checking for aarch64-mageia-linux-gnu-c++... no checking for aarch64-mageia-linux-gnu-gpp... no checking for aarch64-mageia-linux-gnu-aCC... no checking for aarch64-mageia-linux-gnu-CC... no checking for aarch64-mageia-linux-gnu-cxx... no checking for aarch64-mageia-linux-gnu-cc++... no checking for aarch64-mageia-linux-gnu-cl.exe... no checking for aarch64-mageia-linux-gnu-FCC... no checking for aarch64-mageia-linux-gnu-KCC... no checking for aarch64-mageia-linux-gnu-RCC... no checking for aarch64-mageia-linux-gnu-xlC_r... no checking for aarch64-mageia-linux-gnu-xlC... no checking for aarch64-mageia-linux-gnu-clang++... no checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking for g++ option to enable C++11 features... none needed checking whether make supports the include directive... yes (GNU style) checking dependency style of g++... none checking for aarch64-mageia-linux-gnu-gcc... no checking for gcc... gcc checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... none checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for unistd.h... (cached) yes checking for an ANSI C-conforming const... yes checking whether closedir returns void... no checking for strdup... yes checking for memset... yes checking for strtol... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating man/Makefile config.status: creating config.h config.status: executing depfiles commands +-----------------------------------------------------------------------------------+ | Run make && make install when the configure script has finished without problems. | +-----------------------------------------------------------------------------------+ + perl -pi -e 's|/usr/local|/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr|g' Makefile + perl -pi -e 's|man/man1|share/man/man1|g' Makefile + make make all-recursive make[1]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' Making all in src make[2]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/src' g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o main.o main.cpp g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o acpitool.o acpitool.cpp acpitool.cpp: In function 'int Has_ACPI(char*)': 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: In function 'int Get_Kernel_Version(char*, int)': acpitool.cpp:142:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 142 | filename = "/proc/sys/kernel/osrelease"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ acpitool.cpp: In function 'int Set_Kernel_Version()': acpitool.cpp:190:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 190 | filename = "/proc/sys/kernel/osrelease"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ acpitool.cpp: In function 'int Do_Thermal_Info(int, int)': acpitool.cpp:232:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 232 | dirname = "/proc/acpi/thermal_zone/"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ acpitool.cpp: In function 'int Do_Fan_Info(int)': acpitool.cpp:366:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 366 | dirname = "/proc/acpi/fan/"; | ^~~~~~~~~~~~~~~~~ acpitool.cpp: In function 'int Show_WakeUp_Devices(int)': acpitool.cpp:422:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 422 | filename = "/proc/acpi/wakeup"; | ^~~~~~~~~~~~~~~~~~~ acpitool.cpp: In function 'int Toggle_WakeUp_Device(int, int)': acpitool.cpp:469:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 469 | filename = "/proc/acpi/wakeup"; | ^~~~~~~~~~~~~~~~~~~ acpitool.cpp: In function 'int Do_Suspend(int)': acpitool.cpp:535:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 535 | filename = "/proc/acpi/sleep"; // nice default values // | ^~~~~~~~~~~~~~~~~~ acpitool.cpp:536:11: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 536 | str = "3"; | ^~~ acpitool.cpp:542:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 542 | filename = "/sys/power/state"; | ^~~~~~~~~~~~~~~~~~ acpitool.cpp:543:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 543 | str = "mem"; | ^~~~~ acpitool.cpp:546:38: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 546 | case 4 : if(Kernel_24) str = "4"; | ^~~ acpitool.cpp:549:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 549 | filename = "/sys/power/state"; | ^~~~~~~~~~~~~~~~~~ acpitool.cpp:550:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 550 | str = "disk"; | ^~~~~~ acpitool.cpp: In function 'int Has_ACPI(char*)': acpitool.cpp:107:1: warning: control reaches end of non-void function [-Wreturn-type] 107 | } | ^ acpitool.cpp: In function 'int Do_Thermal_Info(int, int)': acpitool.cpp:324:30: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 324 | fgets(str, 120, fp); | ~~~~~^~~~~~~~~~~~~~ acpitool.cpp: In function 'int Do_Fan_Info(int)': acpitool.cpp:375:70: warning: '%s' directive writing up to 255 bytes into a region of size 185 [-Wformat-overflow=] 375 | sprintf(filename[fan_count], "/proc/acpi/fan/%s/state", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from acpitool.cpp:37: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 22 and 277 bytes into a destination of size 200 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ acpitool.cpp: In function 'int Do_Thermal_Info(int, int)': acpitool.cpp:255:90: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 231 [-Wformat-truncation=] 255 | snprintf(tmp_fname, sizeof (tmp_fname) - 1, "/proc/acpi/thermal_zone/%s/state", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from acpitool.cpp:37: /usr/include/bits/stdio2.h:71:35: note: '__builtin___snprintf_chk' output between 31 and 286 bytes into a destination of size 255 71 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 72 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 73 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ acpitool.cpp:258:90: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 231 [-Wformat-truncation=] 258 | snprintf(tmp_fname, sizeof (tmp_fname) - 1, "/proc/acpi/thermal_zone/%s/temperature", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from acpitool.cpp:37: /usr/include/bits/stdio2.h:71:35: note: '__builtin___snprintf_chk' output between 37 and 292 bytes into a destination of size 255 71 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 72 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 73 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ acpitool.cpp:261:90: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 231 [-Wformat-truncation=] 261 | snprintf(tmp_fname, sizeof (tmp_fname) - 1, "/proc/acpi/thermal_zone/%s/trip_points", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from acpitool.cpp:37: /usr/include/bits/stdio2.h:71:35: note: '__builtin___snprintf_chk' output between 37 and 292 bytes into a destination of size 255 71 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 72 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 73 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o ac_adapter.o ac_adapter.cpp ac_adapter.cpp: In function 'int Do_AC_Info(int)': 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: In function 'int Do_AC_Info_Proc(int)': 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: In function 'int Do_AC_Info_Sys()': 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:223:51: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 223 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* 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:215:26: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 215 | fgets(str, 100, power_fp); /* just skip the first 5 lines */ | ~~~~~^~~~~~~~~~~~~~~~~~~~ ac_adapter.cpp:218:22: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 218 | 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); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from ac_adapter.cpp:35: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 30 and 285 bytes into a destination of size 100 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ 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); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from ac_adapter.cpp:35: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 32 and 287 bytes into a destination of size 130 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ ac_adapter.cpp: In function 'int Do_AC_Info_Proc(int)': 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); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from ac_adapter.cpp:35: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 29 and 284 bytes into a destination of size 200 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ ac_adapter.cpp: In function 'int Do_AC_Info(int)': 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); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from ac_adapter.cpp:35: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 29 and 284 bytes into a destination of size 200 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o toshiba.o toshiba.cpp toshiba.cpp: In function 'int Has_Toshiba_ACPI()': toshiba.cpp:50:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 50 | filename = "/proc/acpi/toshiba"; | ^~~~~~~~~~~~~~~~~~~~ toshiba.cpp: In function 'int Do_Toshiba_Fan_Info()': toshiba.cpp:87:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 87 | filename = "/proc/acpi/toshiba/fan"; | ^~~~~~~~~~~~~~~~~~~~~~~~ toshiba.cpp: In function 'int Do_LCD_Info()': toshiba.cpp:137:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 137 | filename = "/proc/acpi/toshiba/lcd"; | ^~~~~~~~~~~~~~~~~~~~~~~~ toshiba.cpp: In function 'int Force_Fan(int)': toshiba.cpp:171:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 171 | filename = "/proc/acpi/toshiba/fan"; | ^~~~~~~~~~~~~~~~~~~~~~~~ toshiba.cpp: In function 'int Set_LCD_Level(int)': toshiba.cpp:205:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 205 | filename = "/proc/acpi/toshiba/lcd"; | ^~~~~~~~~~~~~~~~~~~~~~~~ toshiba.cpp: In function 'int Do_Video_Info()': toshiba.cpp:236:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 236 | filename = "/proc/acpi/toshiba/video"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o asus.o asus.cpp asus.cpp: In function 'int Has_Asus_ACPI()': asus.cpp:50:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 50 | filename = "/proc/acpi/asus"; | ^~~~~~~~~~~~~~~~~ asus.cpp: In function 'int Do_Asus_LCD_Info()': asus.cpp:87:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 87 | filename = "/proc/acpi/asus/brn"; | ^~~~~~~~~~~~~~~~~~~~~ asus.cpp: In function 'int Set_Asus_LCD_Level(int)': asus.cpp:121:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 121 | filename = "/proc/acpi/asus/brn"; | ^~~~~~~~~~~~~~~~~~~~~ asus.cpp: In function 'int Do_Asus_Video_Info()': asus.cpp:149:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 149 | filename = "/proc/acpi/asus/disp"; | ^~~~~~~~~~~~~~~~~~~~~~ asus.cpp: In function 'int Do_Asus_Info()': asus.cpp:204:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 204 | filename = "/proc/acpi/asus/info"; | ^~~~~~~~~~~~~~~~~~~~~~ asus.cpp: In function 'int Set_Asus_LCD_State(int)': asus.cpp:268:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 268 | filename = "/proc/acpi/asus/lcd"; | ^~~~~~~~~~~~~~~~~~~~~ asus.cpp: In function 'int Set_MLed(int)': asus.cpp:293:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 293 | filename = "/proc/acpi/asus/mled"; | ^~~~~~~~~~~~~~~~~~~~~~ asus.cpp: In function 'int Set_WLed(int)': asus.cpp:318:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 318 | filename = "/proc/acpi/asus/wled"; | ^~~~~~~~~~~~~~~~~~~~~~ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o thinkpad.o thinkpad.cpp thinkpad.cpp: In function 'int Has_Thinkpad_ACPI()': thinkpad.cpp:17:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 17 | filename = "/proc/acpi/ibm"; | ^~~~~~~~~~~~~~~~ thinkpad.cpp: In function 'int Eject_Thinkpad_Bay()': thinkpad.cpp:38:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 38 | filename = "/proc/acpi/ibm/bay"; | ^~~~~~~~~~~~~~~~~~~~ thinkpad.cpp: In function 'int Set_Thinkpad_LCD_Level(int)': thinkpad.cpp:59:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 59 | filename = "/proc/acpi/ibm/brightness"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ thinkpad.cpp: In function 'int Do_Thinkpad_Fan_Info()': thinkpad.cpp:85:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 85 | filename = "/proc/acpi/ibm/fan"; | ^~~~~~~~~~~~~~~~~~~~ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o cpu.o cpu.cpp cpu.cpp: In function 'int Show_CPU_Info()': 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); | ~~~~~^~~~~~~~~~~~~~~~~~~~ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o battery.o battery.cpp battery.cpp: In function 'int Get_Battery_Info_from_Proc(int, Battery_Info*, int)': battery.cpp:338:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 338 | dirname = "/proc/acpi/battery/"; //find all entries in this dir | ^~~~~~~~~~~~~~~~~~~~~ battery.cpp: In function 'int Get_Battery_Info_from_Sys(int, Battery_Info*, int)': battery.cpp:521:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 521 | dirname = "/sys/class/power_supply/"; //find all entries in this dir | ^~~~~~~~~~~~~~~~~~~~~~~~~~ battery.cpp:626:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 626 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp:655:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 655 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp:676:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 676 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp:689:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 689 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp:702:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 702 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp:718:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 718 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp:734:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 734 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp:767:43: warning: format '%[^ ' expects a matching 'char*' argument [-Wformat=] 767 | sscanf(str, "%*[^=] %*c %s %[^\n]",temp); | ~~~^~ | | | char* battery.cpp: In function 'int Count_Batteries_ProcFS()': battery.cpp:788:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 788 | dirname = "/proc/acpi/battery/"; | ^~~~~~~~~~~~~~~~~~~~~ battery.cpp: In function 'int Count_Batteries_SysFS()': battery.cpp:837:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 837 | dirname = "/sys/class/power_supply/"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ battery.cpp: In function 'int Get_Battery_Info_from_Sys(int, Battery_Info*, int)': battery.cpp:553:27: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 553 | fscanf(temp_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:618:18: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 618 | fgets(str, 100, power_fp); /* skip first 5 lines */ | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:622:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 622 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:633:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 633 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:651:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 651 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:667:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 667 | fgets(str, 100, power_fp); /* skip 1 line */ | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:672:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 672 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:685:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 685 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:698:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 698 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:714:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 714 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:730:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 730 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:745:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 745 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:759:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 759 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp:763:14: warning: ignoring return value of 'char* fgets(char*, int, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 763 | fgets(str, 100, power_fp); | ~~~~~^~~~~~~~~~~~~~~~~~~~ battery.cpp: In function 'int Count_Batteries_SysFS()': battery.cpp:883:23: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 883 | fscanf(powertype_fp, "%s", str); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ battery.cpp:856:68: warning: '%s' directive writing up to 255 bytes into a region of size 236 [-Wformat-overflow=] 856 | sprintf(filename[findex], "/sys/class/power_supply/%s/type", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from battery.cpp:38: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 30 and 285 bytes into a destination of size 260 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ battery.cpp: In function 'int Get_Battery_Info_from_Sys(int, Battery_Info*, int)': battery.cpp:545:56: warning: '%s' directive writing up to 255 bytes into a region of size 76 [-Wformat-overflow=] 545 | sprintf(temp, "/sys/class/power_supply/%s/type", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from battery.cpp:38: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 30 and 285 bytes into a destination of size 100 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ In file included from /usr/include/string.h:519, from /usr/include/c++/11/cstring:42, from battery.cpp:35: In function 'char* strncpy(char*, const char*, size_t)', inlined from 'int Get_Battery_Info_from_Sys(int, Battery_Info*, int)' at battery.cpp:690:17: /usr/include/bits/string_fortified.h:95:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 12 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=] 95 | return __builtin___strncpy_chk (__dest, __src, __len, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 96 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'char* strncpy(char*, const char*, size_t)', inlined from 'int Get_Battery_Info_from_Sys(int, Battery_Info*, int)' at battery.cpp:703:17: /usr/include/bits/string_fortified.h:95:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 12 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=] 95 | return __builtin___strncpy_chk (__dest, __src, __len, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 96 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'char* strncpy(char*, const char*, size_t)', inlined from 'int Get_Battery_Info_from_Sys(int, Battery_Info*, int)' at battery.cpp:719:17: /usr/include/bits/string_fortified.h:95:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 12 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=] 95 | return __builtin___strncpy_chk (__dest, __src, __len, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 96 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'char* strncpy(char*, const char*, size_t)', inlined from 'int Get_Battery_Info_from_Sys(int, Battery_Info*, int)' at battery.cpp:735:17: /usr/include/bits/string_fortified.h:95:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' writing 12 bytes into a region of size 10 overflows the destination [-Wstringop-overflow=] 95 | return __builtin___strncpy_chk (__dest, __src, __len, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 96 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ battery.cpp: In function 'int Get_Battery_Info_from_Proc(int, Battery_Info*, int)': battery.cpp:363:67: warning: '%s' directive writing up to 255 bytes into a region of size 241 [-Wformat-overflow=] 363 | sprintf(filename[findex], "/proc/acpi/battery/%s/info", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from battery.cpp:38: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 25 and 280 bytes into a destination of size 260 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ battery.cpp:367:67: warning: '%s' directive writing up to 255 bytes into a region of size 176 [-Wformat-overflow=] 367 | sprintf(filename[findex], "/proc/acpi/battery/%s/state", name); | ^~ In file included from /usr/include/stdio.h:888, from /usr/include/c++/11/cstdio:42, from /usr/include/c++/11/ext/string_conversions.h:43, from /usr/include/c++/11/bits/basic_string.h:6606, from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from battery.cpp:38: /usr/include/bits/stdio2.h:38:34: note: '__builtin___sprintf_chk' output between 26 and 281 bytes into a destination of size 195 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o freq.o freq.cpp freq.cpp: In function 'int Get_Min_Freq()': 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: In function 'int Get_Max_Freq()': 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: In function 'int Get_Current_Freq()': 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: In function 'int Get_Governor(char*)': 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: In function 'int Get_Driver(char*)': 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); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ g++ -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -o acpitool main.o acpitool.o ac_adapter.o toshiba.o asus.o thinkpad.o cpu.o battery.o freq.o make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/src' Making all in man make[2]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/man' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/man' make[2]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' make[1]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.Gsy5pe + umask 022 + cd /home/iurt/rpmbuild/BUILD + '[' 1 -eq 1 ']' + '[' /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64 '!=' / ']' + rm -rf /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64 ++ dirname /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64 + mkdir -p /home/iurt/rpmbuild/BUILDROOT + mkdir /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64 + cd acpitool-0.5.1 + '[' 1 -eq 1 ']' + mkdir -p /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64//usr/bin + mkdir -p /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64//usr/share/man/man1 + echo 'warning: %makeinstall is deprecated, try %make_install instead' warning: %makeinstall is deprecated, try %make_install instead + /usr/bin/make prefix=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr exec_prefix=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr bindir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/bin sbindir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/sbin sysconfdir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/etc datadir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/share includedir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/include libdir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/lib64 libexecdir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/libexec localstatedir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/var sharedstatedir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/var/lib mandir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/share/man infodir=/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/share/info install Making install in src make[1]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/src' make[2]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/src' /usr/bin/mkdir -p '/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/bin' /usr/bin/install -c acpitool '/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/bin' make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/src' make[1]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/src' Making install in man make[1]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/man' make[2]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/man' make[2]: Nothing to be done for 'install-exec-am'. /usr/bin/mkdir -p '/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/share/man/man1' /usr/bin/install -c -m 644 acpitool.1 '/home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/share/man/man1' make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/man' make[1]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1/man' make[1]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' make[2]: Entering directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' make[2]: Nothing to be done for 'install-exec-am'. make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' make[1]: Leaving directory '/home/iurt/rpmbuild/BUILD/acpitool-0.5.1' + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 0.5.1-11.mga9 --unique-debug-suffix -0.5.1-11.mga9.aarch64 --unique-debug-src-base acpitool-0.5.1-11.mga9.aarch64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /home/iurt/rpmbuild/BUILD/acpitool-0.5.1 extracting debug info from /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64/usr/bin/acpitool dwz: ./usr/bin/acpitool-0.5.1-11.mga9.aarch64.debug: Unknown debugging section .debug_line_str original debug info size: 848kB, size after compression: 848kB /usr/bin/sepdebugcrcfix: Updated 0 CRC32s, 1 CRC32s did match. 212 blocks + /usr/lib/rpm/check-buildroot + '[' -n '' ']' + /usr/share/spec-helper/clean_files + '[' -n '' ']' + /usr/share/spec-helper/compress_files .xz + '[' -n '' ']' + /usr/share/spec-helper/relink_symlinks + '[' -n '' ']' + /usr/share/spec-helper/clean_perl + '[' -n '' ']' + /usr/share/spec-helper/lib_symlinks + '[' -n '' ']' + /usr/share/spec-helper/gprintify + '[' -n '' ']' + /usr/share/spec-helper/fix_mo + '[' -n '' ']' + /usr/share/spec-helper/fix_pamd + '[' -n '' ']' + /usr/share/spec-helper/remove_info_dir + '[' -n '' ']' + /usr/share/spec-helper/fix_eol + '[' -n '' ']' + /usr/share/spec-helper/check_desktop_files + '[' -n '' ']' + /usr/share/spec-helper/check_elf_files + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python3 1 0 + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/brp-remove-la-files + /usr/lib/rpm/redhat/brp-mangle-shebangs Processing files: acpitool-0.5.1-11.mga9.aarch64 Provides: acpitool = 0.5.1-11.mga9 acpitool(aarch-64) = 0.5.1-11.mga9 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: ld-linux-aarch64.so.1()(64bit) ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.17)(64bit) libc.so.6(GLIBC_2.34)(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.9)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.11)(64bit) libstdc++.so.6(GLIBCXX_3.4.21)(64bit) libstdc++.so.6(GLIBCXX_3.4.29)(64bit) libstdc++.so.6(GLIBCXX_3.4.9)(64bit) Processing files: acpitool-debugsource-0.5.1-11.mga9.aarch64 Provides: acpitool-debugsource = 0.5.1-11.mga9 acpitool-debugsource(aarch-64) = 0.5.1-11.mga9 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Processing files: acpitool-debuginfo-0.5.1-11.mga9.aarch64 Provides: acpitool-debuginfo = 0.5.1-11.mga9 acpitool-debuginfo(aarch-64) = 0.5.1-11.mga9 debuginfo(build-id) = 6eb6ee4a5785d13b6ea72d9f608f81b5bf37b478 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Recommends: acpitool-debugsource(aarch-64) = 0.5.1-11.mga9 Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64 Wrote: /home/iurt/rpmbuild/RPMS/aarch64/acpitool-0.5.1-11.mga9.aarch64.rpm Wrote: /home/iurt/rpmbuild/RPMS/aarch64/acpitool-debugsource-0.5.1-11.mga9.aarch64.rpm Wrote: /home/iurt/rpmbuild/RPMS/aarch64/acpitool-debuginfo-0.5.1-11.mga9.aarch64.rpm Executing(%clean): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.3EbnQb + umask 022 + cd /home/iurt/rpmbuild/BUILD + cd acpitool-0.5.1 + /usr/bin/rm -rf /home/iurt/rpmbuild/BUILDROOT/acpitool-0.5.1-11.mga9.aarch64 + RPM_EC=0 ++ jobs -p + exit 0 Executing(--clean): /bin/sh -e /home/iurt/rpmbuild/tmp/rpm-tmp.ztHGqP + umask 022 + cd /home/iurt/rpmbuild/BUILD + rm -rf acpitool-0.5.1 + RPM_EC=0 ++ jobs -p + exit 0 D: [iurt_root_command] Success!