Skip to content

Commit

Permalink
Merge pull request #23 from badevos/feature/gcc-warning-errors
Browse files Browse the repository at this point in the history
Feature/gcc warning errors
  • Loading branch information
sidcha authored Nov 7, 2023
2 parents 7d5cb00 + 9d13d1b commit cd90eef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions include/utils/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#define BYTE_2(x) (uint8_t)(((x) >> 16) & 0xFF)
#define BYTE_3(x) (uint8_t)(((x) >> 24) & 0xFF)

#ifndef BIT
#define BIT(n) (1ull << (n))
#endif
#define MASK(n) (BIT((n) + 1) - 1)
#define BIT_IS_SET(m, n) (bool)((m) & BIT(n))
#define BIT_SET(m, n) ((m) |= BIT(n))
Expand Down
5 changes: 1 addition & 4 deletions src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

#define _GNU_SOURCE /* See feature_test_macros(7) */

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -69,7 +66,7 @@ static const char *get_rel_path(logger_t *ctx, const char *abs_path)

p = ctx->root_path;
q = abs_path;
while (*p != '\0' && *q != '\0' && *p == *p) {
while (*p != '\0' && *q != '\0' && *p == *q) {
p++;
q++;
}
Expand Down

0 comments on commit cd90eef

Please sign in to comment.