Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 32-bit build problems #10

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions root.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ static void invalidate_watch_descriptors(w_root_t *root,
w_ht_iter_t i;

if (w_ht_first(dir->dirs, &i)) do {
struct watchman_dir *child = (struct watchman_dir*)i.value;
struct watchman_dir *child = (struct watchman_dir*)w_ht_val_ptr(i.value);

invalidate_watch_descriptors(root, child);
} while (w_ht_next(dir->dirs, &i));
Expand Down Expand Up @@ -907,7 +907,7 @@ void w_root_mark_deleted(w_root_t *root, struct watchman_dir *dir,
#if HAVE_INOTIFY_INIT
struct watchman_dir *w_root_resolve_dir_by_wd(w_root_t *root, int wd)
{
return (struct watchman_dir*)w_ht_get(root->wd_to_dir, wd);
return (struct watchman_dir*)w_ht_val_ptr(w_ht_get(root->wd_to_dir, wd));
}
#endif

Expand Down Expand Up @@ -1805,7 +1805,7 @@ static bool try_read_inotify(w_root_t *root)
if (errno == EINTR) {
return false;
}
w_log(W_LOG_FATAL, "read(%d, %lu): error %s\n",
w_log(W_LOG_FATAL, "read(%d, %zu): error %s\n",
root->infd, sizeof(root->ibuf), strerror(errno));
}

Expand Down
4 changes: 4 additions & 0 deletions rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ bool parse_watch_params(int start, json_t *args,
{
bool include = true;
bool negated = false;
#ifdef HAVE_PCRE_H
int is_pcre = 0;
#endif
struct watchman_rule *rule, *prior = NULL;
uint32_t i;

Expand Down Expand Up @@ -307,7 +309,9 @@ bool parse_watch_params(int start, json_t *args,

// Reset negated flag
negated = false;
#ifdef HAVE_PCRE_H
is_pcre = 0;
#endif
}

if (next_arg) {
Expand Down