diff options
author | Kay Sievers <kay@vrfy.org> | 2012-04-10 16:41:52 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-04-10 17:27:46 +0200 |
commit | 04a9d3a00a9290cbf254d0b0ba2ce4521be632ae (patch) | |
tree | 5b2e56bccb51717954cbd97c9a4da328a327db41 /src/udev/udevd.c | |
parent | 235450b0d1b7269476b8a19bb20b016d2d3ffc46 (diff) |
udev: fix gcc warnings showing up after adding $(AM_CFLAGS)
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 35478c19ca..fc33ff0117 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -880,11 +880,6 @@ static void static_dev_create_from_modules(struct udev *udev) static void static_dev_create_links(struct udev *udev) { DIR *dir; - - dir = opendir(udev_get_dev_path(udev)); - if (dir == NULL) - return; - struct stdlinks { const char *link; const char *target; @@ -898,6 +893,10 @@ static void static_dev_create_links(struct udev *udev) }; unsigned int i; + dir = opendir(udev_get_dev_path(udev)); + if (dir == NULL) + return; + for (i = 0; i < ARRAY_SIZE(stdlinks); i++) { struct stat sb; @@ -1115,7 +1114,6 @@ int main(int argc, char *argv[]) int fd_worker = -1; struct epoll_event ep_ctrl, ep_inotify, ep_signal, ep_netlink, ep_worker; struct udev_ctrl_connection *ctrl_conn = NULL; - char **s; int rc = 1; udev = udev_new(); @@ -1525,7 +1523,7 @@ int main(int argc, char *argv[]) continue; if ((now_usec() - worker->event_start_usec) > 30 * 1000 * 1000) { - log_error("worker [%u] timeout, kill it\n", worker->pid, + log_error("worker [%u] %s timeout; kill it\n", worker->pid, worker->event ? worker->event->devpath : "<idle>"); kill(worker->pid, SIGKILL); worker->state = WORKER_KILLED; |