mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-02 00:00:03 +03:00
Fix some minor compiler warnings
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
a76f36fc6e
commit
8f72e6940c
@ -47,10 +47,12 @@ static inline void *krealloc(void *old, size_t size, gfp_t flags)
|
||||
if (flags & __GFP_ZERO)
|
||||
memset(new, 0, size);
|
||||
|
||||
memcpy(new, old,
|
||||
min(malloc_usable_size(old),
|
||||
malloc_usable_size(new)));
|
||||
free(old);
|
||||
if (old) {
|
||||
memcpy(new, old,
|
||||
min(malloc_usable_size(old),
|
||||
malloc_usable_size(new)));
|
||||
free(old);
|
||||
}
|
||||
|
||||
return new;
|
||||
}
|
||||
|
@ -20,7 +20,9 @@
|
||||
#include <linux/uuid.h>
|
||||
#include "ccan/darray/darray.h"
|
||||
|
||||
void die(const char *, ...);
|
||||
#define noreturn __attribute__((noreturn))
|
||||
|
||||
void die(const char *, ...) noreturn;
|
||||
char *mprintf(const char *, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
void *xcalloc(size_t, size_t);
|
||||
|
Loading…
Reference in New Issue
Block a user