commit yast2-core for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package yast2-core for openSUSE:Factory checked in at 2015-05-16 07:14:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-core (Old)
and /work/SRC/openSUSE:Factory/.yast2-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-core"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-core/yast2-core.changes 2015-04-02 16:02:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-core.new/yast2-core.changes 2015-05-16 07:14:13.000000000 +0200
@@ -1,0 +2,5 @@
+Mon May 11 13:50:04 UTC 2015 - mvidner@suse.com
+
+- Fixed compilation warnings.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.g4fxWk/_old 2015-05-16 07:14:14.000000000 +0200
+++ /var/tmp/diff_new_pack.g4fxWk/_new 2015-05-16 07:14:14.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yast2-core
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
++++++ yast2-core-3.1.17.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/CONTRIBUTING.md new/yast2-core-3.1.17/CONTRIBUTING.md
--- old/yast2-core-3.1.17/CONTRIBUTING.md 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/CONTRIBUTING.md 2015-05-13 10:34:11.000000000 +0200
@@ -12,13 +12,13 @@
-----------
If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
+[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
if you don't have an account yet.)
If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee
+[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee
that every bug will be fixed, but we'll try.
When creating a bug report, please follow our [bug reporting
@@ -71,7 +71,7 @@
[widely used
conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
-If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure
+If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure
you mention it in the commit message for cross-reference. Use format like
bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
autolinking](https://help.github.com/articles/github-flavored-markdown#references)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/agent-any/src/AnyAgent.cc new/yast2-core-3.1.17/agent-any/src/AnyAgent.cc
--- old/yast2-core-3.1.17/agent-any/src/AnyAgent.cc 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/agent-any/src/AnyAgent.cc 2015-05-13 10:34:11.000000000 +0200
@@ -675,7 +675,9 @@
// Do not allow touch outside of chroot especially `cd ~` can
// cause errors
- chdir("/");
+ res = chdir("/");
+ if (res == -1)
+ _exit(1);
}
// lets ignore if it fails, we even cannot log here
setenv ("LC_ALL", "C", 1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/agent-any/src/Makefile.am new/yast2-core-3.1.17/agent-any/src/Makefile.am
--- old/yast2-core-3.1.17/agent-any/src/Makefile.am 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/agent-any/src/Makefile.am 2015-05-13 10:34:11.000000000 +0200
@@ -5,17 +5,11 @@
AM_CXXFLAGS = -DY2LOG=\"agent-any\"
plugin_LTLIBRARIES = libpy2ag_anyagent.la
-noinst_LTLIBRARIES = liby2ag_anyagent.la
-liby2ag_anyagent_la_SOURCES = \
+libpy2ag_anyagent_la_SOURCES = \
AnyAgent.cc AnyAgent.h \
AnyAgentBasic.cc \
- AnyAgentComplex.cc
-liby2ag_anyagent_la_LDFLAGS = -version-info 2:0
-liby2ag_anyagent_la_LIBADD = @AGENT_LIBADD@
-
-libpy2ag_anyagent_la_SOURCES = \
- $(liby2ag_anyagent_la_SOURCES) \
+ AnyAgentComplex.cc \
Y2CCAnyAgent.cc
libpy2ag_anyagent_la_LDFLAGS = -version-info 2:0
libpy2ag_anyagent_la_LIBADD = @AGENT_LIBADD@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/agent-ini/src/IniParser.cc new/yast2-core-3.1.17/agent-ini/src/IniParser.cc
--- old/yast2-core-3.1.17/agent-ini/src/IniParser.cc 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/agent-ini/src/IniParser.cc 2015-05-13 10:34:11.000000000 +0200
@@ -770,7 +770,7 @@
if (name_to_close.empty ()) {
// there was no name or we did not find the specified one
for (it = b; it != e; ++it) {
- if ((*it)->getReadBy() == i)
+ if ((size_t)(*it)->getReadBy() == i)
break;
}
if (it == e) {
@@ -1111,12 +1111,8 @@
string file = sec;
if (-1 != rb && (int) rewrites.size () > rb)
{
- int max = rewrites[rb].out.length () + sec.length () + 1;
- char*buf = new char[max + 1];
- snprintf (buf, max, rewrites[rb].out.c_str (), sec.c_str());
- y2debug ("Rewriting %s to %s", sec.c_str(), buf);
- file = buf;
- delete [] buf;
+ file = format(rewrites[rb].out.c_str (), sec.c_str());
+ y2debug ("Rewriting %s to %s", sec.c_str(), file.c_str());
}
return file;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/agent-ini/src/Makefile.am new/yast2-core-3.1.17/agent-ini/src/Makefile.am
--- old/yast2-core-3.1.17/agent-ini/src/Makefile.am 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/agent-ini/src/Makefile.am 2015-05-13 10:34:11.000000000 +0200
@@ -5,9 +5,8 @@
AM_CXXFLAGS = -DY2LOG=\"agent-ini\"
plugin_LTLIBRARIES = libpy2ag_ini.la
-noinst_LTLIBRARIES = liby2ag_ini.la
-liby2ag_ini_la_SOURCES = \
+libpy2ag_ini_la_SOURCES = \
IniAgent.cc \
IniAgent.h \
IniParser.cc \
@@ -15,13 +14,7 @@
IniFile.cc \
IniFile.h \
quotes.cc \
- quotes.h
-
-liby2ag_ini_la_LDFLAGS = -version-info 2:0
-liby2ag_ini_la_LIBADD = @AGENT_LIBADD@
-
-libpy2ag_ini_la_SOURCES = \
- $(liby2ag_ini_la_SOURCES) \
+ quotes.h \
Y2CCIniAgent.cc
libpy2ag_ini_la_LDFLAGS = -version-info 2:0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/agent-modules/src/Makefile.am new/yast2-core-3.1.17/agent-modules/src/Makefile.am
--- old/yast2-core-3.1.17/agent-modules/src/Makefile.am 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/agent-modules/src/Makefile.am 2015-05-13 10:34:11.000000000 +0200
@@ -5,17 +5,11 @@
AM_CXXFLAGS = -DY2LOG=\"agent-modules\"
plugin_LTLIBRARIES = libpy2ag_modules.la
-noinst_LTLIBRARIES = liby2ag_modules.la
-liby2ag_modules_la_SOURCES = \
+libpy2ag_modules_la_SOURCES = \
ModulesConf.h ModulesConf.cc \
ModulesAgent.h ModulesAgent.cc \
- Y2Logger.h
-liby2ag_modules_la_LDFLAGS = -version-info 2:0
-liby2ag_modules_la_LIBADD = @AGENT_LIBADD@
-
-libpy2ag_modules_la_SOURCES = \
- $(liby2ag_modules_la_SOURCES) \
+ Y2Logger.h \
Y2CCModulesAgent.cc
libpy2ag_modules_la_LDFLAGS = -version-info 2:0
libpy2ag_modules_la_LIBADD = @AGENT_LIBADD@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/agent-process/src/Makefile.am new/yast2-core-3.1.17/agent-process/src/Makefile.am
--- old/yast2-core-3.1.17/agent-process/src/Makefile.am 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/agent-process/src/Makefile.am 2015-05-13 10:34:11.000000000 +0200
@@ -5,17 +5,10 @@
AM_CXXFLAGS = -DY2LOG=\"agent-process\" -Wall
plugin_LTLIBRARIES = libpy2ag_process.la
-noinst_LTLIBRARIES = liby2ag_process.la
-
-liby2ag_process_la_SOURCES = \
- ProcessAgent.cc \
- ProcessAgent.h
-
-liby2ag_process_la_LDFLAGS = -version-info 2:0
-liby2ag_process_la_LIBADD = @AGENT_LIBADD@
libpy2ag_process_la_SOURCES = \
- $(liby2ag_process_la_SOURCES) \
+ ProcessAgent.cc \
+ ProcessAgent.h \
Y2CCProcessAgent.cc
libpy2ag_process_la_LDFLAGS = -version-info 2:0
libpy2ag_process_la_LIBADD = @AGENT_LIBADD@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/agent-system/src/ShellCommand.cc new/yast2-core-3.1.17/agent-system/src/ShellCommand.cc
--- old/yast2-core-3.1.17/agent-system/src/ShellCommand.cc 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/agent-system/src/ShellCommand.cc 2015-05-13 10:34:11.000000000 +0200
@@ -162,7 +162,9 @@
// Do not allow touch outside of chroot especially `cd ~` can
// cause errors
- chdir("/");
+ res = chdir("/");
+ if (res == -1)
+ _exit(1);
}
ret = system (command.c_str ());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/base/tools/startshell/startshell.c new/yast2-core-3.1.17/base/tools/startshell/startshell.c
--- old/yast2-core-3.1.17/base/tools/startshell/startshell.c 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/base/tools/startshell/startshell.c 2015-05-13 10:34:11.000000000 +0200
@@ -26,10 +26,13 @@
fclose (stdout);
fclose (stderr);
setsid ();
- fd_ii = open (tty_tv, O_RDWR);
+ fd_ii = open (tty_tv, O_RDWR); /* stdin at tty */
ioctl (fd_ii, TIOCSCTTY, (void *)1);
- dup (fd_ii);
- dup (fd_ii);
+ /* we don't need the fd numbers;
+ and if an error occurs we don't have a fd to write it to */
+ int dupfd __attribute__ ((unused));
+ dupfd = dup (fd_ii); /* stdout at tty */
+ dupfd = dup (fd_ii); /* stderr at tty */
execve ("/bin/bash", args_apci, env_pci);
fprintf (stderr, "Couldn't start shell (errno = %d)\n", errno);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/liby2/src/Y2ProgramComponent.cc new/yast2-core-3.1.17/liby2/src/Y2ProgramComponent.cc
--- old/yast2-core-3.1.17/liby2/src/Y2ProgramComponent.cc 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/liby2/src/Y2ProgramComponent.cc 2015-05-13 10:34:11.000000000 +0200
@@ -302,7 +302,9 @@
_exit (5);
}
- chdir ("/");
+ if (chdir ("/") != 0) {
+ _exit (5);
+ }
}
// close all filedescriptors above stderr, bnc#501758
@@ -419,7 +421,10 @@
// result (..) from the input pipe, which is very important. Otherwise the
// result value would be dropped.
- write(to_external[1], "\n", 1);
+ if (write(to_external[1], "\n", 1) != 1)
+ {
+ y2error ("Couldn't write LF: %s", strerror(errno));
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/liby2/src/Y2SerialComponent.cc new/yast2-core-3.1.17/liby2/src/Y2SerialComponent.cc
--- old/yast2-core-3.1.17/liby2/src/Y2SerialComponent.cc 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/liby2/src/Y2SerialComponent.cc 2015-05-13 10:34:11.000000000 +0200
@@ -344,23 +344,31 @@
// first write one space so the other side gets
// fullfilled its necessities
- write(fd_serial, space_buf, 1);
+ if (write(fd_serial, space_buf, 1) != 1)
+ {
+ y2error ("Couldn't write 1 space: %s", strerror(errno));
+ }
// now wait for a space to be read
// (the other side has the same behaviour)
if (await_readable(TIMEOUT))
{
- read(fd_serial, buf, 1); // read one byte
+ size_t r = read(fd_serial, buf, 1); // read one byte
- if (buf[0] == ' ') spaces_read++; // was a space
- else spaces_read = 0; // trash read --> reset
+ if (r == 1 && buf[0] == ' ')
+ spaces_read++; // was a space
+ else
+ spaces_read = 0; // trash read --> reset
}
}
// now that we've got our NUMSPACES spaces write 2 * NUMSPACES spaces to
// the other side to avoid syncing problems. the remote parser will kindly
// ignore them.
- write(fd_serial, space_buf, 2 * NUMSPACES);
+ if (write(fd_serial, space_buf, 2 * NUMSPACES) != 2 * NUMSPACES)
+ {
+ y2error ("Couldn't write spaces: %s", strerror(errno));
+ }
// now set our parser to the serial line to start communication
parser.setInput(fd_serial, device_name.c_str());
@@ -378,7 +386,12 @@
{
string s = "(" + v->toString() + ")\n"; // store string in string variable ..
const char *cs = s.c_str(); // c_str is valid als long as s
- write(fd_serial, cs, strlen(cs));
+ size_t len = s.length();
+ size_t w = write(fd_serial, cs, len);
+ if (w != len)
+ {
+ y2error ("wrote only %zu of %zu bytes: %s", w, len, strerror(errno));
+ }
}
YCPValue Y2SerialComponent::receiveFromSerial()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/liby2/src/Y2StdioComponent.cc new/yast2-core-3.1.17/liby2/src/Y2StdioComponent.cc
--- old/yast2-core-3.1.17/liby2/src/Y2StdioComponent.cc 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/liby2/src/Y2StdioComponent.cc 2015-05-13 10:34:11.000000000 +0200
@@ -127,7 +127,15 @@
{
string s = "(" + (v.isNull () ? "(nil)" : v->toString ()) + ")\n";
y2debug ("send begin %s", s.c_str ());
- write (to_stderr ? STDERR_FILENO : STDOUT_FILENO, s.c_str (), s.length ());
+
+ int fd = to_stderr ? STDERR_FILENO : STDOUT_FILENO;
+ size_t len = s.length ();
+ size_t w = write (fd, s.c_str (), len);
+ if (w != len)
+ {
+ y2error ("wrote only %zu of %zu bytes: %s", w, len, strerror(errno));
+ }
+
y2debug ("send end %s", s.c_str ());
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-core-3.1.17/liby2/src/genericfrontend.cc new/yast2-core-3.1.17/liby2/src/genericfrontend.cc
--- old/yast2-core-3.1.17/liby2/src/genericfrontend.cc 2015-03-30 13:04:15.000000000 +0200
+++ new/yast2-core-3.1.17/liby2/src/genericfrontend.cc 2015-05-13 10:34:11.000000000 +0200
@@ -104,6 +104,7 @@
#include
participants (1)
-
root@hilbert.suse.de