guix-patches
[Top][All Lists]
Advanced

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

bug#26498: [PATCH] scripts: lint: Fix Guile build warning.


From: Mathieu Othacehe
Subject: bug#26498: [PATCH] scripts: lint: Fix Guile build warning.
Date: Fri, 14 Apr 2017 15:11:13 +0200

* guix/scripts/lint.scm (warn-if-package-has-input): Put (_ message)
  in let, to avoid the following warning :

guix/scripts/lint.scm:251:37: warning: non-literal format string
---
 guix/scripts/lint.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 811f16706..1105dc418 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Danny Milosavljevic <address@hidden>
 ;;; Copyright © 2016 Hartmut Goebel <address@hidden>
 ;;; Copyright © 2017 Alex Kost <address@hidden>
+;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -245,10 +246,13 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
                                  (package-name package)
                                  (if (> (length output) 0)
                                      (string-append ":" (car output))
-                                     ""))))
+                                     "")))
+                         ;; Putting tr-msg in let prevents from this
+                         ;; Guile warning: "non-literal format string".
+                         (tr-msg (_ message)))
                      (when (member input input-names)
                        (emit-warning linted
-                                     (format #f (_ message) input)
+                                     (format #f tr-msg input)
                                      'inputs-to-check)))))
                packages outputs))))
 
-- 
2.12.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]