From 50099cefbaa548b4dc0b218602fb0b6031d4f5bd Mon Sep 17 00:00:00 2001 From: mephistolist <49227141+mephistolist@users.noreply.github.com> Date: Fri, 15 Nov 2024 05:06:03 +0000 Subject: [PATCH 1/4] Update create.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silenced these errors: src/create.c:35:89: warning: unused parameter ‘in_format’ [-Wunused-parameter] 35 | _from_source(const char* src_path, const char* bin_path, const char* in_format, const char* out_format) src/create.c:35:112: warning: unused parameter ‘out_format’ [-Wunused-parameter] 35 | * src_path, const char* bin_path, const char* in_format, const char* out_format) | ~~~~~~~~~~~~^~~~~~~~~~ --- src/create.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/create.c b/src/create.c index 40d1c83..25af9d6 100644 --- a/src/create.c +++ b/src/create.c @@ -36,6 +36,9 @@ int f_create_binary_from_source(const char* src_path, const char* bin_path, cons { struct package pkg; + (void)in_format; + (void)out_format; + // Open the package source open_pkg(src_path, &pkg, NULL); From 6ffb8d72c54b54921088d0839b19f1fd9b68a785 Mon Sep 17 00:00:00 2001 From: mephistolist <49227141+mephistolist@users.noreply.github.com> Date: Fri, 15 Nov 2024 05:13:23 +0000 Subject: [PATCH 2/4] Update install.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/install.c:43:56: warning: unused parameter ‘as_dep’ [-Wunused-parameter] 43 | int f_install_package_source(const char* spm_path, int as_dep, char* repo) { | ~~~~^~~~~~ src/install.c:313:57: warning: unused parameter ‘as_dep’ [-Wunused-parameter] 313 | int install_package_binary(const char* archivePath, int as_dep, const char* repo) { | ~~~~^~~~~~ --- src/install.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/install.c b/src/install.c index 9cf90d5..2d42f46 100755 --- a/src/install.c +++ b/src/install.c @@ -43,6 +43,8 @@ int install_package_source(const char* spm_path, int as_dep) { int f_install_package_source(const char* spm_path, int as_dep, char* repo) { // Check if spm_path is NULL + (void)as_dep; + if (spm_path == NULL) { msg(ERROR, "spm_path is NULL"); return -1; @@ -314,6 +316,8 @@ int install_package_binary(const char* archivePath, int as_dep, const char* repo struct package pkg; + (void)as_dep; + // Get required environment variables char* default_format = getenv("SOVIET_DEFAULT_FORMAT"); char* build_dir = getenv("SOVIET_BUILD_DIR"); From deba0c806310ac9023d4c66fa891801440a224da Mon Sep 17 00:00:00 2001 From: mephistolist <49227141+mephistolist@users.noreply.github.com> Date: Fri, 15 Nov 2024 05:16:33 +0000 Subject: [PATCH 3/4] Update make.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silenced the following warning: src/make.c:216:47: warning: unused parameter ‘package_dir’ [-Wunused-parameter] 216 | int exec_special(const char* cmd, const char* package_dir) { | ~~~~~~~~~~~~^~~~~~~~~~~ --- src/make.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/make.c b/src/make.c index 13fb3d5..668cb0b 100755 --- a/src/make.c +++ b/src/make.c @@ -215,6 +215,8 @@ int make(char* package_dir, struct package* pkg) { */ int exec_special(const char* cmd, const char* package_dir) { dbg(2, "Executing special command: %s", cmd); + + (void)package_dir; if (system(cmd) != 0) { return 1; From f17ac194a8bbd77feafe0e21fc771ffb14fd7391 Mon Sep 17 00:00:00 2001 From: mephistolist <49227141+mephistolist@users.noreply.github.com> Date: Fri, 15 Nov 2024 05:19:46 +0000 Subject: [PATCH 4/4] Update remove.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silenced the following warnings: src/remove.c:24:53: warning: unused parameter ‘sb’ [-Wunused-parameter] 24 | int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) | ~~~~~~~~~~~~~~~~~~~^~ src/remove.c:24:61: warning: unused parameter ‘typeflag’ [-Wunused-parameter] 24 | int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) | ~~~~^~~~~~~~ src/remove.c:24:83: warning: unused parameter ‘ftwbuf’ [-Wunused-parameter] 24 | k_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) | ~~~~~~~~~~~~^~~~~~ --- src/remove.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/remove.c b/src/remove.c index f62e03a..78e3df4 100644 --- a/src/remove.c +++ b/src/remove.c @@ -23,6 +23,10 @@ This function is used as a callback by the nftw function to unlink (remove) file */ int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) { + (void)sb; + (void)typeflag; + (void)ftwbuf; + int rv = remove(fpath); if (rv)