diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2009-09-21 05:32:42 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-09-22 06:13:02 -0700 |
commit | fd0b40a2f3e7e1c56b742c9ae081785811030a3c (patch) | |
tree | f363a74d7cde55057a1bb726e2dbd23a3dcefbf7 | |
parent | 6f7c6c102a418553a109e1b2bb5b1f87578bab58 (diff) |
libglusterfsclient: Fix build warnings
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 275 (libglusterfsclient: Generic build failure bug for libglusterfsclient and booster)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=275
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 8fb144172..d426bd3cf 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -2005,7 +2005,8 @@ glusterfs_glh_get (glusterfs_handle_t handle, const char *path, void *buf, GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, ctx, out); GF_VALIDATE_ABSOLUTE_PATH_OR_GOTO (LIBGF_XL_NAME, path, out); - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, size %ld", path, size); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, size %lu", path, + (long unsigned)size); if (size < 0) { gf_log (LIBGF_XL_NAME, GF_LOG_ERROR, "Invalid size"); errno = EINVAL; @@ -2097,7 +2098,8 @@ glusterfs_get (const char *path, void *buf, size_t size, struct stat *stbuf) GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, buf, out); GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, stbuf, out); - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, size %ld", path, size); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, size %lu", path, + (long unsigned)size); entry = libgf_vmp_search_entry ((char *)path); if (!entry) { errno = ENODEV; @@ -2410,8 +2412,8 @@ __glusterfs_glh_getxattr (glusterfs_handle_t handle, const char *path, GF_VALIDATE_ABSOLUTE_PATH_OR_GOTO (LIBGF_XL_NAME, path, out); GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, name, out); - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, name %s, size %ld," - " op %d", path, name, size, whichop); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, name %s, size %lu," + " op %d", path, name, (long unsigned)size, whichop); if (name[0] == '\0') { errno = EINVAL; gf_log (LIBGF_XL_NAME, GF_LOG_ERROR, "Invalid argument: Name" @@ -2546,8 +2548,8 @@ glusterfs_getxattr (const char *path, const char *name, void *value, GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, name, out); GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, value, out); - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, name %s, size %ld", - path, name, size); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, name %s, size %lu", + path, name, (long unsigned)size); entry = libgf_vmp_search_entry ((char *)path); if (!entry) { errno = ENODEV; @@ -2576,8 +2578,8 @@ glusterfs_lgetxattr (const char *path, const char *name, void *value, GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, name, out); GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, value, out); - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, name %s, size %ld", - path, name, size); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "path %s, name %s, size %lu", + path, name, (long unsigned)size); entry = libgf_vmp_search_entry ((char *)path); if (!entry) { errno = ENODEV; @@ -3491,8 +3493,8 @@ libgf_client_read (libglusterfs_client_ctx_t *ctx, libgf_invalidate_iattr_cache (fd->inode, LIBGF_INVALIDATE_STAT); } - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "size %ld, offset %ld", size, - offset); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "size %lu, offset %"PRIu64, + (long unsigned)size, offset); call_stub_destroy (stub); return op_ret; } @@ -4074,7 +4076,7 @@ glusterfs_readdir_r (glusterfs_dir_t dirfd, struct dirent *entry, offset = fd_ctx->offset; dirp = &fd_ctx->dirp; - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "offset %ld", offset); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "offset %"PRIu64, offset); memset (dirp, 0, sizeof (struct dirent)); op_ret = libgf_client_readdir (ctx, (fd_t *)dirfd, dirp, &offset); @@ -4097,8 +4099,8 @@ glusterfs_readdir_r (glusterfs_dir_t dirfd, struct dirent *entry, memcpy (entry, dirp, sizeof (*entry)); } - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "new offset %ld, entry %s", - offset, entry->d_name); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "new offset %"PRIu64", " + " entry %s", offset, entry->d_name); op_ret = 0; } unlock: @@ -4133,7 +4135,7 @@ glusterfs_readdir (glusterfs_dir_t dirfd) } pthread_mutex_unlock (&fd_ctx->lock); - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "offset %ld", offset); + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "offset %"PRIu64, offset); memset (dirp, 0, sizeof (struct dirent)); op_ret = libgf_client_readdir (ctx, (fd_t *)dirfd, dirp, &offset); @@ -4150,7 +4152,7 @@ glusterfs_readdir (glusterfs_dir_t dirfd) } pthread_mutex_unlock (&fd_ctx->lock); - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "new offset %ld, entry %s", + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "new offset %"PRIu64", entry %s", offset, dirp->d_name); out: return dirp; @@ -7333,7 +7335,7 @@ glusterfs_rewinddir (glusterfs_dir_t dirfd) pthread_mutex_lock (&fd_ctx->lock); { fd_ctx->offset = 0; - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "Offset: %ld", + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "Offset: %"PRIu64, fd_ctx->offset); } pthread_mutex_unlock (&fd_ctx->lock); @@ -7356,7 +7358,7 @@ glusterfs_seekdir (glusterfs_dir_t dirfd, off_t offset) pthread_mutex_lock (&fd_ctx->lock); { fd_ctx->offset = offset; - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "Offset: %ld", + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "Offset: %"PRIu64, fd_ctx->offset); } pthread_mutex_unlock (&fd_ctx->lock); @@ -7381,7 +7383,7 @@ glusterfs_telldir (glusterfs_dir_t dirfd) pthread_mutex_lock (&fd_ctx->lock); { off = fd_ctx->offset; - gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "Offset: %ld", + gf_log (LIBGF_XL_NAME, GF_LOG_DEBUG, "Offset: %"PRIu64, fd_ctx->offset); } pthread_mutex_unlock (&fd_ctx->lock); |