Fix warning - regarding missing prototypes and sign conversions

This commit is contained in:
2026-09-01 19:20:50 +02:00
parent cca190e2f4
commit 3d6b08d9d5
9 changed files with 27 additions and 8 deletions
+1
View File
@@ -4,6 +4,7 @@
#include <string.h>
#include <hammy/command.h>
#include <hammy/commands.h>
#include <hammy/job.h>
#include <hammy/refdb.h>
#include <hammy/utils.h>
+1
View File
@@ -7,6 +7,7 @@
#include <stdarg.h>
#include <hammy/command.h>
#include <hammy/commands.h>
#include <hammy/job.h>
#include <hammy/refdb.h>
+2 -1
View File
@@ -4,6 +4,7 @@
#include <string.h>
#include <hammy/command.h>
#include <hammy/commands.h>
#include <hammy/job.h>
#include <hammy/refdb.h>
@@ -28,7 +29,7 @@
// invalid JSON.
static bool morse_append(char* buf, size_t cap, size_t* len, bool gap, const char* token) {
size_t n = strlen(token);
size_t need = (*len > 0 ? 1 : 0) + (gap ? 2 : 0) + n;
size_t need = (*len > 0 ? 1u : 0u) + (gap ? 2u : 0u) + n;
if (*len + need + 1 > cap) { return false; }
+2 -1
View File
@@ -4,6 +4,7 @@
#include <string.h>
#include <hammy/command.h>
#include <hammy/commands.h>
#include <hammy/job.h>
#include <hammy/refdb.h>
#include <hammy/utils.h>
@@ -29,7 +30,7 @@
// invalid JSON.
static bool phonetic_append(char* buf, size_t cap, size_t* len, bool gap, const char* token) {
size_t n = strlen(token);
size_t need = (*len > 0 ? 1 : 0) + (gap ? 2 : 0) + n;
size_t need = (*len > 0 ? 1u : 0u) + (gap ? 2u : 0u) + n;
if (*len + need + 1 > cap) { return false; }
+1
View File
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <hammy/command.h>
#include <hammy/commands.h>
#include <hammy/job.h>
// Discord epoch, for turning a snowflake back into a wall-clock time.
+1
View File
@@ -4,6 +4,7 @@
#include <string.h>
#include <hammy/command.h>
#include <hammy/commands.h>
#include <hammy/job.h>
#include <hammy/refdb.h>
#include <hammy/utils.h>