summaryrefslogtreecommitdiff
path: root/ext2fs/ext2fs.h
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2015-12-29 18:11:06 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-12-29 20:47:40 +0100
commit6ca2aa1284a5e82df0193d2727941420361bc50f (patch)
treedc6a6058e3a8cdb72c3da086d23f68fe5df8b5d1 /ext2fs/ext2fs.h
parent05c3ffac543052c8d0b171a5f77bb977d5316a61 (diff)
fix compiler warnings in hurd/ext2fs
ext2fs: Fix compiler warnings. * ext2fs/balloc.c: Use unsigned char instead of char. * ext2fs/bitmap.c Use unsigned char for bitmaps. * ext2fs/dir.c: Fix format. * ext2fs/ext2fs.h: Use unsigned char for bitmaps. * ext2fs/ialloc.c: Use unsigned char for bitmaps. Fix format string in ext2_warning. * ext2fs/pager.c: Fix format string in ext2_warning and ext2_error.
Diffstat (limited to 'ext2fs/ext2fs.h')
-rw-r--r--ext2fs/ext2fs.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index b8398192..070d5bd9 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -116,14 +116,14 @@ void pokel_inherit (struct pokel *pokel, struct pokel *from);
#include <stdint.h>
-extern int test_bit (unsigned num, char *bitmap);
+extern int test_bit (unsigned num, unsigned char *bitmap);
-extern int set_bit (unsigned num, char *bitmap);
+extern int set_bit (unsigned num, unsigned char *bitmap);
#if defined(__USE_EXTERN_INLINES) || defined(EXT2FS_DEFINE_EI)
/* Returns TRUE if bit NUM is set in BITMAP. */
EXT2FS_EI int
-test_bit (unsigned num, char *bitmap)
+test_bit (unsigned num, unsigned char *bitmap)
{
const uint32_t *const bw = (uint32_t *) bitmap + (num >> 5);
const uint_fast32_t mask = 1 << (num & 31);
@@ -133,7 +133,7 @@ test_bit (unsigned num, char *bitmap)
/* Sets bit NUM in BITMAP, and returns the previous state of the bit. Unlike
the linux version, this function is NOT atomic! */
EXT2FS_EI int
-set_bit (unsigned num, char *bitmap)
+set_bit (unsigned num, unsigned char *bitmap)
{
uint32_t *const bw = (uint32_t *) bitmap + (num >> 5);
const uint_fast32_t mask = 1 << (num & 31);
@@ -143,7 +143,7 @@ set_bit (unsigned num, char *bitmap)
/* Clears bit NUM in BITMAP, and returns the previous state of the bit.
Unlike the linux version, this function is NOT atomic! */
EXT2FS_EI int
-clear_bit (unsigned num, char *bitmap)
+clear_bit (unsigned num, unsigned char *bitmap)
{
uint32_t *const bw = (uint32_t *) bitmap + (num >> 5);
const uint_fast32_t mask = 1 << (num & 31);
@@ -437,7 +437,7 @@ struct pokel global_pokel;
/* If the block size is less than the page size, then this bitmap is used to
record which disk blocks are actually modified, so we don't stomp on parts
of the disk which are backed by file pagers. */
-char *modified_global_blocks;
+unsigned char *modified_global_blocks;
pthread_spinlock_t modified_global_blocks_lock;
extern int global_block_modified (block_t block);