diff options
-rw-r--r-- | firmware/buflib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c index 098872f317..a007603161 100644 --- a/firmware/buflib.c +++ b/firmware/buflib.c | |||
@@ -113,7 +113,8 @@ buflib_init(struct buflib_context *ctx, void *buf, size_t size) | |||
113 | ctx->alloc_end = bd_buf; | 113 | ctx->alloc_end = bd_buf; |
114 | ctx->compact = true; | 114 | ctx->compact = true; |
115 | 115 | ||
116 | BDEBUGF("buflib initialized with %d.%2d kiB", size / 1024, (size%1000)/10); | 116 | BDEBUGF("buflib initialized with %lu.%2lu kiB", |
117 | (unsigned long)size / 1024, ((unsigned long)size%1000)/10); | ||
117 | } | 118 | } |
118 | 119 | ||
119 | /* Allocate a new handle, returning 0 on failure */ | 120 | /* Allocate a new handle, returning 0 on failure */ |
@@ -203,7 +204,7 @@ move_block(struct buflib_context* ctx, union buflib_data* block, int shift) | |||
203 | 204 | ||
204 | int handle = ctx->handle_table - tmp; | 205 | int handle = ctx->handle_table - tmp; |
205 | BDEBUGF("%s(): moving \"%s\"(id=%d) by %d(%d)\n", __func__, block[3].name, | 206 | BDEBUGF("%s(): moving \"%s\"(id=%d) by %d(%d)\n", __func__, block[3].name, |
206 | handle, shift, shift*sizeof(union buflib_data)); | 207 | handle, shift, shift*(int)sizeof(union buflib_data)); |
207 | new_block = block + shift; | 208 | new_block = block + shift; |
208 | new_start = tmp->alloc + shift*sizeof(union buflib_data); | 209 | new_start = tmp->alloc + shift*sizeof(union buflib_data); |
209 | 210 | ||