From b7a795375716b832db60e95ecd2fb0aae75c1a0f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Feb 2014 10:48:43 +0100 Subject: db/Directory: use "unsigned" for inode and device This is what we get from the storage plugin via FileInfo. Fixes a compiler warning on Mac OS X where dev_t appears to be signed. --- src/db/Directory.hxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/db/Directory.hxx') diff --git a/src/db/Directory.hxx b/src/db/Directory.hxx index 705826a65..ebca95935 100644 --- a/src/db/Directory.hxx +++ b/src/db/Directory.hxx @@ -28,10 +28,8 @@ #include -#include - -#define DEVICE_INARCHIVE (dev_t)(-1) -#define DEVICE_CONTAINER (dev_t)(-2) +static constexpr unsigned DEVICE_INARCHIVE = -1; +static constexpr unsigned DEVICE_CONTAINER = -2; #define directory_for_each_child(pos, directory) \ list_for_each_entry(pos, &(directory).children, siblings) @@ -81,8 +79,7 @@ struct Directory { Directory *parent; time_t mtime; - ino_t inode; - dev_t device; + unsigned inode, device; bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */ std::string path; -- cgit v1.2.3