summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index df252ca0bc..2b3c7212a2 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -930,7 +930,7 @@ inline static bool str_oneof(const char *str, const char *list)
930 while (*list) 930 while (*list)
931 { 931 {
932 sep = strchr(list, '|'); 932 sep = strchr(list, '|');
933 l = sep ? (long)sep - (long)list : (int)strlen(list); 933 l = sep ? (intptr_t)sep - (intptr_t)list : (int)strlen(list);
934 if ((l==len) && !strncasecmp(str, list, len)) 934 if ((l==len) && !strncasecmp(str, list, len))
935 return true; 935 return true;
936 list += sep ? l + 1 : l; 936 list += sep ? l + 1 : l;
@@ -2362,7 +2362,7 @@ static bool build_numeric_indices(struct tagcache_header *h, int tmpfd)
2362 /* Avoid processing this entry again. */ 2362 /* Avoid processing this entry again. */
2363 idx.flag |= FLAG_RESURRECTED; 2363 idx.flag |= FLAG_RESURRECTED;
2364 2364
2365 lseek(masterfd, -sizeof(struct index_entry), SEEK_CUR); 2365 lseek(masterfd, -(off_t)sizeof(struct index_entry), SEEK_CUR);
2366 if (ecwrite_index_entry(masterfd, &idx) != sizeof(struct index_entry)) 2366 if (ecwrite_index_entry(masterfd, &idx) != sizeof(struct index_entry))
2367 { 2367 {
2368 logf("masterfd writeback fail #1"); 2368 logf("masterfd writeback fail #1");
@@ -3432,7 +3432,7 @@ static int parse_changelog_line(int line_n, char *buf, void *parameters)
3432 struct index_entry idx; 3432 struct index_entry idx;
3433 char tag_data[TAG_MAXLEN+32]; 3433 char tag_data[TAG_MAXLEN+32];
3434 int idx_id; 3434 int idx_id;
3435 long masterfd = (long)parameters; 3435 long masterfd = (long)(intptr_t)parameters;
3436 const int import_tags[] = { tag_playcount, tag_rating, tag_playtime, 3436 const int import_tags[] = { tag_playcount, tag_rating, tag_playtime,
3437 tag_lastplayed, tag_commitid, tag_lastelapsed, 3437 tag_lastplayed, tag_commitid, tag_lastelapsed,
3438 tag_lastoffset }; 3438 tag_lastoffset };
@@ -3526,7 +3526,7 @@ bool tagcache_import_changelog(void)
3526 3526
3527 filenametag_fd = open_tag_fd(&tch, tag_filename, false); 3527 filenametag_fd = open_tag_fd(&tch, tag_filename, false);
3528 3528
3529 fast_readline(clfd, buf, sizeof buf, (long *)masterfd, 3529 fast_readline(clfd, buf, sizeof buf, (void *)(intptr_t)masterfd,
3530 parse_changelog_line); 3530 parse_changelog_line);
3531 3531
3532 close(clfd); 3532 close(clfd);
@@ -3665,7 +3665,7 @@ static bool delete_entry(long idx_id)
3665 } 3665 }
3666 3666
3667 myidx.flag |= FLAG_DELETED; 3667 myidx.flag |= FLAG_DELETED;
3668 lseek(masterfd, -sizeof(struct index_entry), SEEK_CUR); 3668 lseek(masterfd, -(off_t)sizeof(struct index_entry), SEEK_CUR);
3669 if (ecwrite_index_entry(masterfd, &myidx) != sizeof(struct index_entry)) 3669 if (ecwrite_index_entry(masterfd, &myidx) != sizeof(struct index_entry))
3670 { 3670 {
3671 logf("delete_entry(): write_error #1"); 3671 logf("delete_entry(): write_error #1");