From 4d81f8e1749905b9ad8edf32420ff52bd1ba6e5b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 30 Dec 2017 03:37:31 +0000 Subject: [PATCH] scst_debug.h: Avoid that smatch complains about passing a pointer to format specifier %lx git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7309 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_debug.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 0caae1872..de8f50d7e 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -339,28 +339,30 @@ do { \ #define TRACE_EXIT_RES(res) \ do { \ + unsigned long lres = res; \ + \ if (trace_flag & TRACE_ENTRYEXIT) { \ if (trace_flag & TRACE_PID) { \ PRINT(KERN_INFO, "[%d]: EXIT %s: %ld", current->pid, \ - __func__, (long)(res)); \ - } \ - else { \ + __func__, lres); \ + } else { \ PRINT(KERN_INFO, "EXIT %s: %ld", \ - __func__, (long)(res)); \ + __func__, lres); \ } \ } \ } while (0) #define TRACE_EXIT_HRES(res) \ do { \ + unsigned long lres = (unsigned long)res; \ + \ if (trace_flag & TRACE_ENTRYEXIT) { \ if (trace_flag & TRACE_PID) { \ PRINT(KERN_INFO, "[%d]: EXIT %s: 0x%lx", current->pid, \ - __func__, (long)(res)); \ - } \ - else { \ + __func__, lres); \ + } else { \ PRINT(KERN_INFO, "EXIT %s: %lx", \ - __func__, (long)(res)); \ + __func__, lres); \ } \ } \ } while (0)