Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoclean.c build error in master #7451

Open
grubles opened this issue Jul 5, 2024 · 1 comment
Open

autoclean.c build error in master #7451

grubles opened this issue Jul 5, 2024 · 1 comment

Comments

@grubles
Copy link
Contributor

grubles commented Jul 5, 2024

Master at 4b69c57 errors when building autoclean.c on OpenBSD 7.5 with clang.

$ cc --version
OpenBSD clang version 16.0.6
Target: amd64-unknown-openbsd7.5
cc plugins/autoclean.c
plugins/autoclean.c:260:7: error: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
                           num_cleaned, subsystem_to_str(&sv));
                           ^~~~~~~~~~~
1 error generated.
gmake: *** [Makefile:301: plugins/autoclean.o] Error 1
@grubles
Copy link
Contributor Author

grubles commented Jul 28, 2024

This seems to fix it.

diff --git a/plugins/autoclean.c b/plugins/autoclean.c                                                 
index c3febc05a..4da2374e2 100644                                                                      
--- a/plugins/autoclean.c                                                                              
+++ b/plugins/autoclean.c                                                                              
@@ -256,7 +256,7 @@ static struct command_result *clean_finished(struct clean_info *cinfo)
                if (!num_cleaned)                                                                      
                        continue;                                                                      
                                                   
-               plugin_log(plugin, LOG_DBG, "cleaned %"PRIu64" from %s",
+               plugin_log(plugin, LOG_DBG, "cleaned %lu from %s",
                           num_cleaned, subsystem_to_str(&sv));                           
                *total_cleaned(&sv) += num_cleaned; 
                jsonrpc_set_datastore_string(plugin, cinfo->cmd,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant