Skip to content
Closed

Osx #218

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: 3 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
matrix:
platform:
- { name: macOS, os: macos-latest, shell: sh }
- { name: Ubuntu, os: ubuntu-latest, shell: sh }
- { name: Windows - mingw32, os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: Windows - mingw64, os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
build-type: [Release]
build-static: [ON]
steps:
Expand Down Expand Up @@ -52,9 +49,11 @@ jobs:
${{matrix.platform.msys-env}}-ninja
${{matrix.platform.msys-env}}-openssl
${{matrix.platform.msys-env}}-zlib
- name: Pedantic Test
run: /usr/bin/cc -Wall -Werror -Wpedantic osx.c

- name: Configure CMake
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DBUILD_STATIC=${{matrix.build-static}} -DBUILD_TESTING=ON -DCMAKE_C_FLAGS="-Wall -Werror"
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DBUILD_STATIC=${{matrix.build-static}} -DBUILD_TESTING=ON -DCMAKE_C_FLAGS="-Wall -Werror -Wpedantic"

- name: Build
run: cmake --build build
Expand Down
6 changes: 3 additions & 3 deletions lib/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ extern "C"
void _unshield_log(int level, const char* file, int line, const char* format, ...);

#define unshield_trace(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_TRACE,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
_unshield_log(UNSHIELD_LOG_LEVEL_TRACE,__func__, __LINE__, format, ##__VA_ARGS__)

#define unshield_warning(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__func__, __LINE__, format, ##__VA_ARGS__)

#define unshield_error(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_ERROR,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
_unshield_log(UNSHIELD_LOG_LEVEL_ERROR,__func__, __LINE__, format, ##__VA_ARGS__)

#ifdef __cplusplus
}
Expand Down
7 changes: 7 additions & 0 deletions osx.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main(void) {
size_t value = 0;
printf("%zi", value);
return 0;
}
Loading