configure: remove -Wno-format-nonliteral
[babeltrace.git] / src / autodisc / autodisc.c
index b69db98ab830f9ce6ed3b5cdeb5c7a8cbc056979..1a4f07dc39d537011f01428cb1d120d34dd02208 100644 (file)
@@ -1,29 +1,15 @@
 /*
- * Copyright (c) 2019 EfficiOS Inc. and Linux Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * SPDX-License-Identifier: MIT
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright (c) 2019 EfficiOS Inc. and Linux Foundation
  */
 
 #define BT_LOG_TAG "CLI-CFG-SRC-AUTO-DISC"
 #define BT_LOG_OUTPUT_LEVEL log_level
 #include "logging/log.h"
 
+#include <stdbool.h>
+
 #include "autodisc.h"
 #include "common/common.h"
 
@@ -626,18 +612,19 @@ auto_source_discovery_internal_status auto_discover_source_for_input_as_dir_or_f
 
                dir = g_dir_open(input->str, 0, &error);
                if (!dir) {
-                       const char *fmt = "Failed to open directory %s: %s";
-                       BT_LOGW(fmt, input->str, error->message);
+#define BT_FMT "Failed to open directory %s: %s"
+                       BT_LOGW(BT_FMT, input->str, error->message);
 
                        if (error->code == G_FILE_ERROR_ACCES) {
                                /* This is not a fatal error, we just skip it. */
                                status = AUTO_SOURCE_DISCOVERY_INTERNAL_STATUS_NO_MATCH;
                                goto end;
                        } else {
-                               BT_AUTODISC_LOGE_APPEND_CAUSE(fmt, input->str,
+                               BT_AUTODISC_LOGE_APPEND_CAUSE(BT_FMT, input->str,
                                        error->message);
                                goto error;
                        }
+#undef BT_FMT
                }
 
                saved_input_len = input->len;
This page took 0.025876 seconds and 4 git commands to generate.