Use alloca for stack based memory allocation

This commit is contained in:
Marius Greuel
2022-01-07 17:23:50 +01:00
parent d05c2db3fb
commit fe6f08d48f
5 changed files with 14 additions and 42 deletions

View File

@@ -334,7 +334,11 @@ if(MSVC)
add_compile_definitions(_CRT_NONSTDC_NO_WARNINGS=1)
add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS=1)
add_compile_options(/W3)
add_compile_options(/wd4018) # warning C4018: signed/unsigned mismatch
add_compile_options(/wd4244) # warning C4244: conversion from '...' to '...', possible loss of data
add_compile_options(/wd4267) # warning C4267: conversion from '...' to '...', possible loss of data
add_compile_options(/wd5105) # warning C5105: macro expansion producing 'xxx' has undefined behavior
add_compile_options(/wd6255) # warning C6255: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
set(EXTRA_WINDOWS_SOURCES ${EXTRA_WINDOWS_SOURCES}
"${PROJECT_SOURCE_DIR}/msvc/getopt.c"