This prevents passing string literals without a cast and generates warnings with -Wwrite-strings or -Wpedantic. The format string is not modified by the function.
Location
src/shared/log.h:6, src/shared/log.c:13
Suggested Fix
Change the signature to const char* format (and const char* message):
## Description
In `src/shared/log.h` line 6 and `src/shared/log.c` line 13, the `log_message()` function signature uses `char* format` instead of `const char* format`:
```c
void log_message(LogLevel log_level, char* message, ...);
```
This prevents passing string literals without a cast and generates warnings with `-Wwrite-strings` or `-Wpedantic`. The format string is not modified by the function.
## Location
`src/shared/log.h:6`, `src/shared/log.c:13`
## Suggested Fix
Change the signature to `const char* format` (and `const char* message`):
```c
void log_message(LogLevel log_level, const char* message, ...);
```
## Severity
Low
## Category
Quality
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
In
src/shared/log.hline 6 andsrc/shared/log.cline 13, thelog_message()function signature useschar* formatinstead ofconst char* format:This prevents passing string literals without a cast and generates warnings with
-Wwrite-stringsor-Wpedantic. The format string is not modified by the function.Location
src/shared/log.h:6,src/shared/log.c:13Suggested Fix
Change the signature to
const char* format(andconst char* message):Severity
Low
Category
Quality