mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
errors and warnings fixes
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
global read_only LNK_Chunk g_null_chunk = { 0, 0, /* is_discarded: */ 1 };
|
||||
global read_only LNK_Chunk *g_null_chunk_ptr = &g_null_chunk;
|
||||
|
||||
internal LNK_ChunkRef
|
||||
lnk_chunk_ref(U64 sect_id, U64 chunk_id)
|
||||
{
|
||||
|
||||
@@ -43,8 +43,6 @@ typedef struct LNK_Chunk
|
||||
#if LNK_DEBUG_CHUNKS
|
||||
String8 debug;
|
||||
#endif
|
||||
|
||||
int debug;
|
||||
} LNK_Chunk, * LNK_ChunkPtr;
|
||||
|
||||
typedef struct LNK_ChunkNode
|
||||
@@ -115,8 +113,12 @@ typedef struct LNK_ChunkManager
|
||||
U64 total_chunk_count;
|
||||
} LNK_ChunkManager;
|
||||
|
||||
extern LNK_Chunk g_null_chunk;
|
||||
extern LNK_Chunk *g_null_chunk_ptr;
|
||||
////////////////////////////////
|
||||
|
||||
read_only global LNK_Chunk g_null_chunk = { 0, 0, /* is_discarded: */ 1 };
|
||||
read_only global LNK_Chunk *g_null_chunk_ptr = &g_null_chunk;
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal LNK_ChunkRef lnk_chunk_ref(U64 sect_id, U64 chunk_id);
|
||||
internal B32 lnk_chunk_ref_is_equal(LNK_ChunkRef a, LNK_ChunkRef b);
|
||||
|
||||
@@ -506,7 +506,7 @@ lnk_get_mt_path(Arena *arena)
|
||||
#undef OS_WINDOWS
|
||||
#define OS_WINDOWS 1
|
||||
#else
|
||||
mt_path = str8_lit("llvm-mt.exe");
|
||||
String8 mt_path = str8_lit("llvm-mt.exe");
|
||||
#endif
|
||||
return mt_path;
|
||||
}
|
||||
@@ -1914,10 +1914,8 @@ lnk_build_config(Arena *arena, int argc, char **argv)
|
||||
|
||||
String8List raw_cmd_line = os_string_list_from_argcv(arena, argc, argv);
|
||||
|
||||
#if OS_WINDOWS
|
||||
// remove exe name first argument
|
||||
str8_list_pop_front(&raw_cmd_line);
|
||||
#endif
|
||||
|
||||
// init config
|
||||
LNK_Config *config = lnk_config_from_cmd_line(arena, raw_cmd_line);
|
||||
|
||||
@@ -2483,10 +2483,10 @@ lnk_format_u128(U8 *buf, U64 buf_max, U64 length, U128 v)
|
||||
if (length > 0 && buf_max > 0) {
|
||||
if (length <= 8) {
|
||||
U64 mask = length == 8 ? max_U64 : (1ull << (length*8)) - 1;
|
||||
size = raddbg_snprintf((char*)buf, buf_max - 1, "%llX", v.u64[0] & mask);
|
||||
size = raddbg_snprintf((char*)buf, buf_max - 1, "%llX", (long long)(v.u64[0] & mask));
|
||||
} else {
|
||||
U64 mask1 = length == 16 ? max_U64 : (1ull << ((length-8)*8)) - 1;
|
||||
size = raddbg_snprintf((char*)buf, buf_max, "%llX%llX", v.u64[1] & mask1, v.u64[0]);
|
||||
size = raddbg_snprintf((char*)buf, buf_max, "%llX%llX", (long long)(v.u64[1] & mask1), (long long)v.u64[0]);
|
||||
}
|
||||
}
|
||||
return size;
|
||||
|
||||
@@ -117,7 +117,7 @@ internal void lnk_suppress_error(LNK_ErrorCode code);
|
||||
internal LNK_ErrorCodeStatus lnk_get_error_code_status(LNK_ErrorCode code);
|
||||
|
||||
internal void lnk_internal_error(LNK_InternalError code, char *file, int line, char *fmt, ...);
|
||||
#define lnk_invalid_path(fmt, ...) lnk_internal_error(LNK_InternalError_InvalidPath, __FILE__, __LINE__, fmt, __VA_ARGS__)
|
||||
#define lnk_not_implemented(fmt, ...) lnk_internal_error(LNK_InternalError_NotImplemented, __FILE__, __LINE__, fmt, __VA_ARGS__)
|
||||
#define lnk_incomplete_switch(fmt, ...) lnk_internal_error(LNK_InternalError_IncompleteSwitch, __FILE__, __LINE__, fmt, __VA_ARGS__)
|
||||
#define lnk_invalid_path(...) lnk_internal_error(LNK_InternalError_InvalidPath, __FILE__, __LINE__, __VA_ARGS__)
|
||||
#define lnk_not_implemented(...) lnk_internal_error(LNK_InternalError_NotImplemented, __FILE__, __LINE__, __VA_ARGS__)
|
||||
#define lnk_incomplete_switch(...) lnk_internal_error(LNK_InternalError_IncompleteSwitch, __FILE__, __LINE__, __VA_ARGS__)
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
global read_only LNK_Symbol g_null_symbol = { str8_lit_comp("NULL"), LNK_Symbol_DefinedStatic };
|
||||
global read_only LNK_Symbol *g_null_symbol_ptr = &g_null_symbol;
|
||||
|
||||
internal void
|
||||
lnk_init_symbol(LNK_Symbol *symbol, String8 name, LNK_SymbolType type)
|
||||
{
|
||||
|
||||
@@ -169,8 +169,10 @@ typedef struct
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
extern LNK_Symbol g_null_symbol;
|
||||
extern LNK_Symbol *g_null_symbol_ptr;
|
||||
global read_only LNK_Symbol g_null_symbol = { str8_lit_comp("NULL"), LNK_Symbol_DefinedStatic };
|
||||
global read_only LNK_Symbol *g_null_symbol_ptr = &g_null_symbol;
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal void lnk_init_symbol(LNK_Symbol *symbol, String8 name, LNK_SymbolType type);
|
||||
internal void lnk_init_defined_symbol(LNK_Symbol *symbol, String8 name, LNK_DefinedSymbolVisibility visibility, LNK_DefinedSymbolFlags flags);
|
||||
|
||||
Reference in New Issue
Block a user