Skip to content

Commit

Permalink
logger: Fix write return type for those that return size_t
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Aug 4, 2024
1 parent 0982c3d commit 14cf1b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* For MSVC, we are expected use _write() and the type of len is unsigned int
* instead of size_t in unix.
*/
#define write(fd, data, len) _write((fd), (data), (unsigned int)(len))
#define write(fd, data, len) (size_t)_write((fd), (data), (unsigned int)(len))
#endif

#define RED "\x1B[31m"
Expand Down Expand Up @@ -59,8 +59,7 @@ static const char *log_level_names[LOG_MAX_LEVEL] = {

static inline void logger_log_set_color(logger_t *ctx, const char *color)
{
int ret;
size_t len;
size_t ret, len;

if (ctx->flags & LOGGER_FLAG_NO_COLORS)
return;
Expand Down

0 comments on commit 14cf1b2

Please sign in to comment.