From 4a5c7480aa2f3c08f8395bfbd313bf81982b71cb Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Thu, 20 Apr 2023 13:49:25 +0000 Subject: [PATCH] Fix up a few small warnings. --- src/HttpRouter.c | 2 +- src/Main.c | 5 ++++- src/Routes/RouteProcControl.c | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/HttpRouter.c b/src/HttpRouter.c index ac3d401..6b93686 100644 --- a/src/HttpRouter.c +++ b/src/HttpRouter.c @@ -195,7 +195,7 @@ HttpRouterRoute(HttpRouter * router, char *path, void *args, void **ret) RouteNode *node; char *pathPart; char *tmp; - HttpRouteFunc *exec; + HttpRouteFunc *exec = NULL; Array *matches; size_t i; int retval; diff --git a/src/Main.c b/src/Main.c index 84b4b16..767ee7a 100644 --- a/src/Main.c +++ b/src/Main.c @@ -627,7 +627,10 @@ finish: * Change back into starting directory so initial chdir() * call works. */ - chdir(startDir); + if (chdir(startDir) != 0) + { + /* TODO: Seems problematic, what do we do? */ + } goto start; } diff --git a/src/Routes/RouteProcControl.c b/src/Routes/RouteProcControl.c index 76be5ad..83c9128 100644 --- a/src/Routes/RouteProcControl.c +++ b/src/Routes/RouteProcControl.c @@ -75,6 +75,7 @@ ROUTE_IMPL(RouteProcControl, path, argp) response = MatrixErrorCreate(M_UNRECOGNIZED); goto finish; } + break; case HTTP_GET: if (strcmp(op, "stats") == 0) {