Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gcc warning errors #23

Merged
merged 3 commits into from
Nov 7, 2023
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
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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you.

p++;
q++;
}
Expand Down
Loading