瀏覽代碼

Address build warnings

Ensure warnings have been accounted for.
master
TheoryOfNekomata 1 年之前
父節點
當前提交
9c7cacf3ed
共有 7 個文件被更改,包括 12 次插入7 次删除
  1. +1
    -0
      src/packages/compat/IZ_compat.h
  2. +2
    -2
      src/packages/game/IZ_app_net.c
  3. +1
    -1
      src/packages/game/data/IZ_list.c
  4. +1
    -1
      src/packages/game/memory/IZ_pool.c
  5. +2
    -0
      src/packages/log/IZ_log.h
  6. +2
    -0
      src/packages/stdinc/IZ_string.h
  7. +3
    -3
      src/packages/timer/IZ_timer.c

+ 1
- 0
src/packages/compat/IZ_compat.h 查看文件

@@ -7,6 +7,7 @@
#endif

#if defined IZ_UNIX
typedef unsigned long size_t;
typedef size_t rsize_t;
typedef int errno_t;
#endif


+ 2
- 2
src/packages/game/IZ_app_net.c 查看文件

@@ -3,7 +3,7 @@
void IZ_AppHandleNetworkingInboundBinaryEvents(struct IZ_App* app, void* binary_raw, size_t len) {
u8* binary = binary_raw;
size_t i;
printf("%llu: Binary", IZ_AppGetTicks(app));
printf("%lu: Binary", IZ_AppGetTicks(app));
for (i = 0; i < len; i += 1) {
printf("%c%02x", i == 0 ? '(' : ' ', binary[i]);
}
@@ -11,7 +11,7 @@ void IZ_AppHandleNetworkingInboundBinaryEvents(struct IZ_App* app, void* binary_
}

void IZ_AppHandleNetworkingInboundTextEvents(struct IZ_App* app, const char* text, size_t len) {
printf("%llu: String(%s)\n", IZ_AppGetTicks(app), text);
printf("%lu: String(%s)\n", IZ_AppGetTicks(app), text);
}

void IZ_AppHandleOutboundNetworking(struct IZ_App* app) {


+ 1
- 1
src/packages/game/data/IZ_list.c 查看文件

@@ -57,7 +57,7 @@ void IZ_ListPrintNodeValues(IZ_List* list) {
u64 index = 0;
printf("\nlist@%p\n", list);
do {
printf(" %llu@%p:%u\n", index, *list->iterator, *((unsigned int*)(*list->iterator)->value));
printf(" %lu@%p:%u\n", index, *list->iterator, *((unsigned int*)(*list->iterator)->value));
index += 1;
list->iterator = &(*list->iterator)->next;
} while (*list->iterator);


+ 1
- 1
src/packages/game/memory/IZ_pool.c 查看文件

@@ -26,7 +26,7 @@ IZ_PoolItem* IZ_PoolAllocate(IZ_Pool* pool, IZ_PoolAllocationArgs args) {
// TODO deallocate memory based from priority
}

void* pointer = &pool->memory[pool->next_address];
void* pointer = &((u8*) pool->memory)[pool->next_address];
IZ_ListNode* new_item;
IZ_ListAppendNode(&pool->items, &(IZ_PoolItem) {
.pointer = pointer,


+ 2
- 0
src/packages/log/IZ_log.h 查看文件

@@ -21,6 +21,8 @@
#include <SDL_syswm.h>
#elif defined IZ_MACOS
#include <unistd.h>
#elif defined IZ_UNIX
#include <unistd.h>
#endif

#include "../compat/IZ_compat.h"


+ 2
- 0
src/packages/stdinc/IZ_string.h 查看文件

@@ -7,6 +7,8 @@
#include <SDL_syswm.h>
#elif defined IZ_MACOS
#include <unistd.h>
#elif defined IZ_UNIX
#include "../../src/packages/compat/IZ_compat.h"
#endif

errno_t IZ_memcpy(void*, rsize_t, const void*, rsize_t);


+ 3
- 3
src/packages/timer/IZ_timer.c 查看文件

@@ -40,7 +40,7 @@ unsigned int IZ_TimerElapsedRaw() {
* @sa IZ_TimerElapsedRaw()
*/
char* IZ_TimerElapsed() {
static char buffer[32];
static char buffer[48];
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
unsigned int seconds = t.tv_sec - IZ_TIMER_START_TIMESTAMP;
@@ -58,7 +58,7 @@ char* IZ_TimerElapsed() {
char* IZ_TimerNow() {
struct timespec t;
clock_gettime(CLOCK_REALTIME, &t);
static char buffer[32];
static char buffer[48];
unsigned int seconds = t.tv_sec;
unsigned int milliseconds = t.tv_nsec / 1000000;
static char formatted[32];
@@ -75,7 +75,7 @@ char* IZ_TimerNow() {
char* IZ_TimerNowPathSafe() {
struct timespec t;
clock_gettime(CLOCK_REALTIME, &t);
static char buffer[32];
static char buffer[48];
unsigned int seconds = t.tv_sec;
unsigned int milliseconds = t.tv_nsec / 1000000;
static char formatted[32];


Loading…
取消
儲存