[tracker/sam/warning-format-security] meson: Enable -Wformat-security



commit 53b3190741defe7451a5ee8860cf4693270c924c
Author: Sam Thursfield <sam afuera me uk>
Date:   Mon Sep 3 14:35:27 2018 +0200

    meson: Enable -Wformat-security
    
    This warning is disabled by default at warning level 1.
    
    Multiple distros are building Tracker with -Werror=format-security and
    discovering regressions, we have had reports from Debian, Fedora and
    NixOS so far, so let's enable it by default.

 meson.build | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/meson.build b/meson.build
index f2f536644..34da14b68 100644
--- a/meson.build
+++ b/meson.build
@@ -47,9 +47,12 @@ libmath = cc.find_library('m', required: false)
 # to the Vala commandline, but still works as expected for C code.
 uuid = cc.find_library('uuid')
 
+add_project_arguments('-Wformat', '-Wformat-security', language: 'c')
+
 # There are various gchar vs. unsigned char warnings that occur in extract
 # modules, it's not worth adding casts everywhere so we disable the warning.
 add_project_arguments('-Wno-pointer-sign', language: 'c')
+
 add_project_arguments('-DTRACKER_COMPILATION', language: 'c')
 
 enable_fts = get_option('fts')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]