[yast-commit] [yast/yast-core] 861d40: fixed a signedness warning
Branch: refs/heads/master Home: https://github.com/yast/yast-core Commit: 861d40d3ebd9c6679fae047f45aa0eb2262bf1c1 https://github.com/yast/yast-core/commit/861d40d3ebd9c6679fae047f45aa0eb2262... Author: Martin Vidner <martin@vidner.net> Date: 2015-04-19 (Sun, 19 Apr 2015) Changed paths: M agent-ini/src/IniParser.cc Log Message: ----------- fixed a signedness warning warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Since we're comparing for equality with a number of items in the file, casting to unsigned gives the correct result. Commit: 46b075d9c29824188dc827f0c74048e9374d0c04 https://github.com/yast/yast-core/commit/46b075d9c29824188dc827f0c74048e9374... Author: Martin Vidner <martin@vidner.net> Date: 2015-04-19 (Sun, 19 Apr 2015) Changed paths: M agent-any/src/Makefile.am M agent-ini/src/Makefile.am M agent-modules/src/Makefile.am M agent-process/src/Makefile.am Log Message: ----------- removed useless libraries and their warnings link: warning: `-version-info/-version-number' is ignored for convenience libraries liby2foo was formerly linked to y2base, but nowadays libpy2foo (p for plugin) is dlopen'd Commit: dcf7153b29fca57eda5c78fb8351ccfcdaab514a https://github.com/yast/yast-core/commit/dcf7153b29fca57eda5c78fb8351ccfcdaa... Author: Martin Vidner <martin@vidner.net> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M agent-ini/src/IniParser.cc Log Message: ----------- Fixed a format string warning by using a previously introduced helper. warning: format not a string literal, argument types not checked [-Wformat-nonliteral] Commit: 1734debc871226969f7e3e1c69c8f564c90e19e0 https://github.com/yast/yast-core/commit/1734debc871226969f7e3e1c69c8f564c90... Author: Martin Vidner <martin@vidner.net> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M libycp/src/pathsearch.cc Log Message: ----------- fixed an operator-precedence warning warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] Luckily, the code did the right thing even if buggy, because S_IXOTH happens to be 1. Commit: 62dfa07404459979494c508decb6ec5f53e70c1e https://github.com/yast/yast-core/commit/62dfa07404459979494c508decb6ec5f53e... Author: Martin Vidner <martin@vidner.net> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M agent-any/src/AnyAgent.cc M agent-system/src/ShellCommand.cc M liby2/src/Y2ProgramComponent.cc Log Message: ----------- do check the return value of chdir warning: ignoring return value of 'int chdir(const char*)', declared with attribute warn_unused_result [-Wunused-result] if the chroot succeeded then the chdir("/") shouldn't fail anyway Commit: b576bb04467fe8f3f902be13707bdfb4746f3a67 https://github.com/yast/yast-core/commit/b576bb04467fe8f3f902be13707bdfb4746... Author: Martin Vidner <mvidner@suse.cz> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M liby2util-r/src/y2log.cc Log Message: ----------- Explicitly ignore the return value of system(3). Funnily, (void) system(...) still shows the warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 and the "fix" in GCC was to introduce -Wno-unused-result (which disables all such warnings). Commit: bfb6aa80b91a94b6a94c343bd1ad29fcefa80809 https://github.com/yast/yast-core/commit/bfb6aa80b91a94b6a94c343bd1ad29fcefa... Author: Martin Vidner <mvidner@suse.cz> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M liby2util-r/src/include/y2util/y2log.h M liby2util-r/src/y2changes.cc M liby2util-r/src/y2log.cc Log Message: ----------- Removed part of duplicated code. y2changes.cc is mostly duplicated from y2log.cc and will need more cleanup. This partial cleanup only aims to remove the warning about ignoring the return value of system(3). Commit: 483103745a331ac3ce5c5cf4296df0ff980a1543 https://github.com/yast/yast-core/commit/483103745a331ac3ce5c5cf4296df0ff980... Author: Martin Vidner <mvidner@suse.cz> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M liby2/src/genericfrontend.cc M liby2util-r/src/include/y2util/stringutil.h M liby2util-r/src/y2changes.cc M liby2util-r/src/y2log.cc Log Message: ----------- Use stringutil::form/vform instead of asprintf/vasprintf This gets rid of the warnings: warning: ignoring return value of 'int asprintf(char**, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] which point to the error case where vasprintf cannot allocate memory and the result is undefined, so the program would likely crash. stringutil::form return an empty string in such case. Commit: 8608a894fc47bf1449246490cdb8ffe5068daf24 https://github.com/yast/yast-core/commit/8608a894fc47bf1449246490cdb8ffe5068... Author: Martin Vidner <mvidner@suse.cz> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M base/tools/startshell/startshell.c M liby2/src/Y2ProgramComponent.cc M liby2/src/Y2SerialComponent.cc M liby2/src/Y2StdioComponent.cc Log Message: ----------- Fixed warnings about unused return values for read, write, dup. Commit: a2a479bbf8296dc3c7e4ab3d6d0035c017a40f56 https://github.com/yast/yast-core/commit/a2a479bbf8296dc3c7e4ab3d6d0035c017a... Author: Martin Vidner <mvidner@suse.cz> Date: 2015-05-11 (Mon, 11 May 2015) Changed paths: M package/yast2-core.changes Log Message: ----------- changelog Commit: 58b154edb1a8a755ca957a1155e2bd3f49243505 https://github.com/yast/yast-core/commit/58b154edb1a8a755ca957a1155e2bd3f492... Author: Martin Vidner <martin@vidner.net> Date: 2015-05-13 (Wed, 13 May 2015) Changed paths: M agent-any/src/AnyAgent.cc M agent-any/src/Makefile.am M agent-ini/src/IniParser.cc M agent-ini/src/Makefile.am M agent-modules/src/Makefile.am M agent-process/src/Makefile.am M agent-system/src/ShellCommand.cc M base/tools/startshell/startshell.c M liby2/src/Y2ProgramComponent.cc M liby2/src/Y2SerialComponent.cc M liby2/src/Y2StdioComponent.cc M liby2/src/genericfrontend.cc M liby2util-r/src/include/y2util/stringutil.h M liby2util-r/src/include/y2util/y2log.h M liby2util-r/src/y2changes.cc M liby2util-r/src/y2log.cc M libycp/src/pathsearch.cc M package/yast2-core.changes Log Message: ----------- Merge pull request #100 from mvidner/warnings Fix compiler warnings, with explanations Compare: https://github.com/yast/yast-core/compare/87474b835366...58b154edb1a8
participants (1)
-
GitHub