From: Kay Sievers Date: Tue, 17 Apr 2012 16:42:09 +0000 (+0200) Subject: silence a bunch of gcc warnings X-Git-Tag: v183~268 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=018ef268b1667ba0dbfc15804ab33deed6092147;p=systemd silence a bunch of gcc warnings --- diff --git a/docs/gudev/Makefile.am b/docs/gudev/Makefile.am index f2e95324..5c821674 100644 --- a/docs/gudev/Makefile.am +++ b/docs/gudev/Makefile.am @@ -21,7 +21,7 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. # e.g. DOC_SOURCE_DIR=../../../gtk -DOC_SOURCE_DIR=$(top_srcdir)/src/gudev +DOC_SOURCE_DIR=$(top_srcdir)/src/gudev $(top_builddir)/src/gudev # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c index a83fb3ce..8b8fc45e 100644 --- a/src/detect-virt/detect-virt.c +++ b/src/detect-virt/detect-virt.c @@ -115,7 +115,8 @@ static int parse_argv(int argc, char *argv[]) { int main(int argc, char *argv[]) { const char *id = NULL; - int retval, r; + int r; + int retval = EXIT_SUCCESS; /* This is mostly intended to be used for scripts which want * to detect whether we are being run in a virtualized diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 3cb41c7c..d34c1427 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -514,7 +514,7 @@ static const char *normalize_controller(const char *controller) { } static int join_path(const char *controller, const char *path, const char *suffix, char **fs) { - char *t; + char *t = NULL; if (!(controller || path)) return -EINVAL; diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index b8cdc708..6509f588 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -42,7 +42,7 @@ static const struct udev_builtin *builtins[] = { int udev_builtin_init(struct udev *udev) { unsigned int i; - int err; + int err = 0; for (i = 0; i < ELEMENTSOF(builtins); i++) { if (builtins[i]->init) {