diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog
index 35095af12d7eb1c5e5c828f31e192b353789b09c..d5fd2638502c6ef8a9420dd47ece95d2d798e33b 100644
--- a/smartmontools/ChangeLog
+++ b/smartmontools/ChangeLog
@@ -2,6 +2,9 @@ $Id$
 
 2018-08-10  Christian Franke  <franke@computer.org>
 
+	smartctl.cpp, os_win32/wmiquery.h: Add missing printf() format checks.
+	This also silences -Wformat-nonliteral warnings from clang++ 5.0.
+
 	os_win32.cpp: Increase IOCTL_ATA_PASS_THROUGH timeout to 60 seconds.
 
 2018-08-10  Zhdan Bybin  <zhdan.bybin@intel.com>
diff --git a/smartmontools/os_win32/wmiquery.h b/smartmontools/os_win32/wmiquery.h
index 408fd171c49221582b1a39d992f5fd5fab61a872..5db0e07367102e06fd6de6a4453816f04dd7f5a1 100644
--- a/smartmontools/os_win32/wmiquery.h
+++ b/smartmontools/os_win32/wmiquery.h
@@ -3,7 +3,7 @@
  *
  * Home page of code is: http://www.smartmontools.org
  *
- * Copyright (C) 2011-15 Christian Franke
+ * Copyright (C) 2011-18 Christian Franke
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -168,11 +168,13 @@ public:
 
   /// Execute query, get result list.
   /// Return false on error.
-  bool vquery(wbem_enumerator & result, const char * qstr, va_list args) /*const*/;
+  bool vquery(wbem_enumerator & result, const char * qstr, va_list args) /*const*/
+       __attribute_format_printf(3, 0);
 
   /// Execute query, get single result object.
   /// Return false on error or result size != 1.
-  bool vquery1(wbem_object & obj, const char * qstr, va_list args) /*const*/;
+  bool vquery1(wbem_object & obj, const char * qstr, va_list args) /*const*/
+       __attribute_format_printf(3, 0);
 
   /// Version of vquery() with printf() formatting.
   bool query(wbem_enumerator & result, const char * qstr, ...) /*const*/
diff --git a/smartmontools/smartctl.cpp b/smartmontools/smartctl.cpp
index 3747ed7792e107fad49b569636ff98dccfe50b45..a4e07fa738d7523de33c1bb7bd13348d76e62c09 100644
--- a/smartmontools/smartctl.cpp
+++ b/smartmontools/smartctl.cpp
@@ -1278,6 +1278,7 @@ static const char * parse_options(int argc, char** argv,
 
 // Printing functions
 
+__attribute_format_printf(3, 0)
 static void vjpout(bool is_js_impl, const char * msg_severity,
                    const char *fmt, va_list ap)
 {
@@ -1330,7 +1331,7 @@ static void vjpout(bool is_js_impl, const char * msg_severity,
 
 // Default: print to stdout
 // --json: ignore
-// --json=a: append to "output" array
+// --json=o: append to "output" array
 // --json=u: add "smartctl_NNNN_u" element(s)
 void pout(const char *fmt, ...)
 {
@@ -1348,7 +1349,7 @@ void pout(const char *fmt, ...)
 
 // Default: Print to stdout
 // --json: ignore
-// --json=a: append to "output" array
+// --json=o: append to "output" array
 // --json=i: add "smartctl_NNNN_i" element(s)
 void jout(const char *fmt, ...)
 {
@@ -1366,7 +1367,7 @@ void jout(const char *fmt, ...)
 
 // Default: print to stdout
 // --json: append to "messages"
-// --json=a: append to "output" array
+// --json=o: append to "output" array
 // --json=i: add "smartctl_NNNN_i" element(s)
 void jinf(const char *fmt, ...)
 {