From 018ef268b1667ba0dbfc15804ab33deed6092147 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 17 Apr 2012 18:42:09 +0200 Subject: [PATCH] silence a bunch of gcc warnings --- docs/gudev/Makefile.am | 2 +- src/detect-virt/detect-virt.c | 3 ++- src/shared/cgroup-util.c | 2 +- src/udev/udev-builtin.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) 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) { -- 2.39.5