aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-04 18:46:46 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-14 08:27:03 +0200
commitd08f68523ea9a39af8176703e48fd47a987893b5 (patch)
tree8f9b9d05c6b3fcb3d59c424e9e7b888f70e71b77 /main.c
parent8fc09516a8028a754e8cd4aecefa0677791379cf (diff)
downloadffwd-d08f68523ea9a39af8176703e48fd47a987893b5.tar.gz
ffwd-d08f68523ea9a39af8176703e48fd47a987893b5.zip
chore: address static analyzer warnings
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.c b/main.c
index a5728d2..18afd00 100644
--- a/main.c
+++ b/main.c
@@ -527,7 +527,6 @@ int main(int argc, char *argv[])
int mlx_quantize_bits = 0;
int mlx_quantize_group_size = 64;
int dist_activation_bits = 32;
- const char *backend = "cpu";
const char *host = "127.0.0.1";
const char *api_key = NULL;
int port = 8000;
@@ -559,10 +558,13 @@ int main(int argc, char *argv[])
}
}
else if (!strcmp(f, "--model")) {
- if (append_model_spec(&model_specs, argv[++arg_start]) != 0) return 1;
+ if (append_model_spec(&model_specs, argv[++arg_start]) != 0) {
+ free_model_specs(&model_specs);
+ return 1;
+ }
}
else if (!strcmp(f, "--backend")) {
- backend = argv[++arg_start];
+ const char *backend = argv[++arg_start];
if (!strcmp(backend, "mlx")) {
#ifdef USE_MLX
use_mlx = 1;
@@ -627,7 +629,6 @@ int main(int argc, char *argv[])
else if (!strcmp(f, "--mlx")) {
#ifdef USE_MLX
use_mlx = 1;
- backend = "mlx";
#else
fprintf(stderr, "--mlx not available (build with: make mlx)\n");
free_model_specs(&model_specs);