summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-10-21 18:40:33 +0200
committerKay Sievers <kay@vrfy.org>2013-10-21 18:40:33 +0200
commit7759ecb21e2057eacf2dbd111d2f13ea10bff844 (patch)
tree0c17b4899eec0801ac9ed468d796f94c79ba33f5 /src
parent03a170c03cd4a09721369ece48affb70d66c6b90 (diff)
silent a few more gcc warnings
Diffstat (limited to 'src')
-rw-r--r--src/core/dbus-cgroup.c6
-rw-r--r--src/shared/time-util.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
index 5654b8c711..f198357637 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/core/dbus-cgroup.c
@@ -238,7 +238,6 @@ int bus_cgroup_set_property(
DBusMessageIter sub2;
const char *path;
uint64_t u64;
- CGroupBlockIODeviceBandwidth *a;
dbus_message_iter_recurse(&sub, &sub2);
if (bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_STRING, &path, true) < 0 ||
@@ -246,6 +245,7 @@ int bus_cgroup_set_property(
return -EINVAL;
if (mode != UNIT_CHECK) {
+ CGroupBlockIODeviceBandwidth *a = NULL;
CGroupBlockIODeviceBandwidth *b;
bool exist = false;
@@ -329,7 +329,6 @@ int bus_cgroup_set_property(
const char *path;
uint64_t u64;
unsigned long ul;
- CGroupBlockIODeviceWeight *a;
dbus_message_iter_recurse(&sub, &sub2);
@@ -342,6 +341,7 @@ int bus_cgroup_set_property(
return -EINVAL;
if (mode != UNIT_CHECK) {
+ CGroupBlockIODeviceWeight *a = NULL;
CGroupBlockIODeviceWeight *b;
bool exist = false;
@@ -465,7 +465,6 @@ int bus_cgroup_set_property(
while (dbus_message_iter_get_arg_type(&sub) == DBUS_TYPE_STRUCT) {
DBusMessageIter sub2;
const char *path, *rwm;
- CGroupDeviceAllow *a;
dbus_message_iter_recurse(&sub, &sub2);
@@ -487,6 +486,7 @@ int bus_cgroup_set_property(
}
if (mode != UNIT_CHECK) {
+ CGroupDeviceAllow *a = NULL;
CGroupDeviceAllow *b;
bool exist = false;
diff --git a/src/shared/time-util.c b/src/shared/time-util.c
index 4b4cd7a270..7bb7d4ec5a 100644
--- a/src/shared/time-util.c
+++ b/src/shared/time-util.c
@@ -283,7 +283,7 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
/* The result of this function can be parsed with parse_sec */
for (i = 0; i < ELEMENTSOF(table); i++) {
- int k;
+ int k = 0;
size_t n;
bool done = false;
usec_t a, b;