Avoid "comparison between signed and unsigned integer expressions"
warnings. If it's at all hard or risky to avoid this type of warning,
then it's not worthwhile. Here, it's easy and safe.
* daemon/inotify.c (inotify_posn): Declare local to be of unsigned type.
(do_inotify_read, do_inotify_files): Likewise.
static int inotify_fd = -1;
static char inotify_buf[64*1024*1024]; /* Event buffer, [0..posn-1] is valid */
-static int inotify_posn = 0;
+static size_t inotify_posn = 0;
/* Because inotify_init does NEED_ROOT, NEED_INOTIFY implies NEED_ROOT. */
#define NEED_INOTIFY(errcode) \
while (space > 0) {
struct inotify_event *event;
- int n, r;
+ int r;
+ size_t n;
r = read (inotify_fd, inotify_buf + inotify_posn,
sizeof (inotify_buf) - inotify_posn);
{
char **ret = NULL;
int size = 0, alloc = 0;
- int i;
+ unsigned int i;
FILE *fp;
guestfs_int_inotify_event_list *events;
char buf[PATH_MAX];