rt: Do some casting to avoid warnings
This commit is contained in:
parent
91067e9df4
commit
20ea37b336
|
@ -91,7 +91,7 @@ memory_region::realloc(void *mem, size_t orig_size) {
|
|||
fprintf(stderr,
|
||||
"memory_region::realloc> "
|
||||
"Out of memory allocating %ld bytes",
|
||||
size);
|
||||
(long int) size);
|
||||
abort();
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ memory_region::malloc(size_t size, const char *tag, bool zero) {
|
|||
fprintf(stderr,
|
||||
"memory_region::malloc> "
|
||||
"Out of memory allocating %ld bytes",
|
||||
size);
|
||||
(long int) size);
|
||||
abort();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ array_list<T>::push(T value) {
|
|||
size_t new_capacity = _capacity * 2;
|
||||
void* buffer = realloc(_data, new_capacity * sizeof(T));
|
||||
if (buffer == NULL) {
|
||||
fprintf(stderr, "array_list::push> Out of memory allocating %ld bytes", new_capacity * sizeof(T));
|
||||
fprintf(stderr, "array_list::push> Out of memory allocating %ld bytes", (long int) (new_capacity * sizeof(T)));
|
||||
abort();
|
||||
}
|
||||
_data = (T *) buffer;
|
||||
|
|
Loading…
Reference in a new issue