Skip to content

Commit

Permalink
build: make the code splint-friendly where not already
Browse files Browse the repository at this point in the history
  • Loading branch information
jnpkrn committed Mar 17, 2016
1 parent 8e9a296 commit 2834143
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/qb/qblog.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,13 @@ typedef union {
int32_t qb_log_ctl2(int32_t target, enum qb_log_conf conf_type,
qb_log_ctl2_arg_t arg);

# ifndef S_SPLINT_S
#define QB_LOG_CTL2_I32(a) ((qb_log_ctl2_arg_t) { .i32 = (a) })
#define QB_LOG_CTL2_S(a) ((qb_log_ctl2_arg_t) { .s = (a) })
#else
#define QB_LOG_CTL2_I32(a) ((qb_log_ctl2_arg_t)(a))
#define QB_LOG_CTL2_S(a) ((qb_log_ctl2_arg_t)(a))
#endif

/**
* This allows you modify the 'tags' and 'targets' callsite fields at runtime.
Expand Down
3 changes: 2 additions & 1 deletion lib/loop_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
*/
#include "os_base.h"

#ifdef HAVE_SYS_RESOURCE_H
/* due to MinGW/splint emitting "< Location unknown >: Previous use of" */
#if defined(HAVE_SYS_RESOURCE_H) && !defined(S_SPLINT_S)
#include <sys/resource.h>
#endif

Expand Down

0 comments on commit 2834143

Please sign in to comment.