]> www.infradead.org Git - users/mchehab/rasdaemon.git/commit
rasdaemon: Fix "ignoring return value" build warning.
authorYazen Ghannam <yazen.ghannam@amd.com>
Fri, 8 May 2020 14:51:29 +0000 (14:51 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 21 Jul 2020 12:48:05 +0000 (14:48 +0200)
commit5b354684dfcd4e0ff1c4ef3a1914ff116c42cccc
tree477422aed3047da02c1ebf5fa5e76396fbe17bfa
parent5d00690583860313916825ce891a7b0d8005a0f9
rasdaemon: Fix "ignoring return value" build warning.

The following build warning is given:

ras-diskerror-handler.c: In function ras_diskerror_event_handler:
ras-diskerror-handler.c:98:2:
warning: ignoring return value of asprintf, declared with attribute warn_unused_result [-Wunused-result]
  asprintf(&ev.dev, "%u:%u", major(dev), minor(dev));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check the return value of asprintf() to avoid the warning.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
ras-diskerror-handler.c