Skip to content

Commit

Permalink
fixed a bug with gettid for Linux systems where syscall returns an in…
Browse files Browse the repository at this point in the history
…t; changed version to 6.0.7
  • Loading branch information
nickeldan committed Jan 6, 2023
1 parent fe011c1 commit 01b9a62
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CC ?= gcc
debug ?= no

CFLAGS := -std=gnu99 -fdiagnostics-color -Wall -Wextra
CFLAGS := -std=gnu99 -fdiagnostics-color -Wall -Wextra -Werror
ifeq ($(debug),yes)
CFLAGS += -O0 -g -DDEBUG
else
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Vanilla Squad
=============

:Author: Daniel Walker
:Version: 6.0.6
:Date: 2022-12-14
:Version: 6.0.7
:Date: 2023-01-05

Overview
========
Expand Down
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
6.0.7:
- Fixed a bug with gettid for Linux systems where syscall returns an int.

6.0.6:
- vasqLoggerCreate now sets *logger to NULL upon error.
- vasqSetLoggerLevel no longer emits a logging message.
Expand Down
2 changes: 1 addition & 1 deletion include/vasq/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @brief Current version of the library.
*/
#define VASQ_VERSION "6.0.6"
#define VASQ_VERSION "6.0.7"

#ifndef NO_OP
#define NO_OP ((void)0)
Expand Down
5 changes: 5 additions & 0 deletions scripts/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -ex

make tests

find . -name '*.[hc]' -print0 | xargs -0 -n 1 clang-format --dry-run --Werror
2 changes: 1 addition & 1 deletion source/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ vlogToBuffer(const vasqLogger *logger, vasqLogLevel_t level, VASQ_CONTEXT_DECL,
case 'p': vasqIncSnprintf(dst, remaining, "%li", (long)getpid()); break;

#ifdef __linux__
case 'T': vasqIncSnprintf(dst, remaining, "%li", syscall(__NR_gettid)); break;
case 'T': vasqIncSnprintf(dst, remaining, "%li", (long)syscall(__NR_gettid)); break;
#endif

case 'L': vasqIncSnprintf(dst, remaining, "%s", logLevelName(level)); break;
Expand Down

0 comments on commit 01b9a62

Please sign in to comment.