summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2014-06-30 15:48:49 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-07-01 11:35:17 +0200
commit90ac46f71068d131391492360a8553bdd005b5a7 (patch)
treeb24bb375f652e987be631449c679232bc1224c95 /src/util
parent588f8fbe74e66cc015f185a5b798173d320a65b5 (diff)
downloadsssd-90ac46f71068d131391492360a8553bdd005b5a7.tar.gz
sssd-90ac46f71068d131391492360a8553bdd005b5a7.tar.xz
sssd-90ac46f71068d131391492360a8553bdd005b5a7.zip
Add type parameter to DISCARD_ALIGN macro
This macro will be used to suppress alignment warnings when casting pointers. fixes: https://fedorahosted.org/sssd/ticket/1359 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/util_safealign.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/util_safealign.h b/src/util/util_safealign.h
index 685d65966..ba216f606 100644
--- a/src/util/util_safealign.h
+++ b/src/util/util_safealign.h
@@ -34,7 +34,7 @@
/* Use this macro to suppress alignment warnings (use it
* only to suppress false-positives) */
-#define DISCARD_ALIGN(ptr) ((void *)(ptr))
+#define DISCARD_ALIGN(ptr, type) ((type)(void *)(ptr))
#define IS_ALIGNED(ptr, type) \
((uintptr_t)(ptr) % sizeof(type) == 0)