Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ project(cmark
LANGUAGES C CXX
VERSION 0.31.2)

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED YES)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.21)
set(CMAKE_C_STANDARD 23)
else()
set(CMAKE_C_STANDARD 11)
endif()
set(CMAKE_C_EXTENSIONS NO)

if(CMAKE_BUILD_TYPE STREQUAL Asan)
Expand Down
6 changes: 3 additions & 3 deletions src/utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ void cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,
cmark_strbuf_put(dest, str, char_len);
} else if (char_len >= 0) {
uint32_t key = c;
uint32_t *entry = bsearch(&key, cf_table,
CF_TABLE_SIZE, sizeof(uint32_t),
cf_compare);
const uint32_t *entry = bsearch(&key, cf_table,
CF_TABLE_SIZE, sizeof(uint32_t),
cf_compare);
if (entry == NULL) {
cmark_strbuf_put(dest, str, char_len);
} else {
Expand Down
Loading