From 3e9bcd7b1fcfcd992e87396e4c8f53b4fae9fd95 Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Wed, 19 May 2021 17:43:18 -0400 Subject: [PATCH] Fix more -Wformat-nonliteral and -Wmismatched-tags when compiling with clang --- httpd/api.cxx | 2 +- httpd/backends.cxx | 2 +- stapbpf/stapbpf.cxx | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/httpd/api.cxx b/httpd/api.cxx index dc61fb57d..ef17bdddb 100644 --- a/httpd/api.cxx +++ b/httpd/api.cxx @@ -382,7 +382,7 @@ public: response build_collection_rh::POST(const request &req) { - client_request_data *crd = new struct client_request_data; + client_request_data *crd = new client_request_data; if (crd == NULL) { // Return an error. server_error("500 - internal server error"); diff --git a/httpd/backends.cxx b/httpd/backends.cxx index aca99d8bb..532cf869b 100644 --- a/httpd/backends.cxx +++ b/httpd/backends.cxx @@ -178,7 +178,7 @@ class container_backend : public backend_base public: container_backend(); - bool can_generate_module(const struct client_request_data *crd); + bool can_generate_module(const client_request_data *crd); int generate_module(const client_request_data *crd, const vector &argv, const string &uuid, diff --git a/stapbpf/stapbpf.cxx b/stapbpf/stapbpf.cxx index 153186adf..19dede929 100644 --- a/stapbpf/stapbpf.cxx +++ b/stapbpf/stapbpf.cxx @@ -79,6 +79,7 @@ int target_pid = 0; char *target_cmd = NULL; /* ../staprun/common.c functions */ +__attribute__ ((format (printf, 1, 2))) void eprintf(const char *fmt, ...) { va_list va; -- 2.43.5