]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_usbpd_logger: Add __printf annotation to append_str()
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Tue, 14 Apr 2020 20:12:39 +0000 (22:12 +0200)
committerBenson Leung <bleung@chromium.org>
Mon, 4 May 2020 21:02:01 +0000 (14:02 -0700)
commita02996e8f5e1820a05b5457f95c92a5d6d7b0d6e
tree6ea154b269bba2f066cc289b43c36302f22a69b7
parent44d694bd4cdbd46828228cd10c43a3f077e7fa09
platform/chrome: cros_usbpd_logger: Add __printf annotation to append_str()

This allows the compiler to verify the format strings vs the types of
the arguments. Also, silence the warning (triggered by W=1):

  cros_usbpd_logger.c:55:2: warning: function ‘append_str’ might be a
  candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
drivers/platform/chrome/cros_usbpd_logger.c