diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-06 10:50:53 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-10 00:34:03 -0400 |
commit | 156b5f172a64103bcb13b6d26288388b9019caa3 (patch) | |
tree | e29141720bd9d0e4c722dd3c7dc8c62d5113db43 /kernel/trace/trace_export.c | |
parent | 7bffc23e56e92c14b787bf4d95249a32085bfed5 (diff) | |
download | kernel_samsung_tuna-156b5f172a64103bcb13b6d26288388b9019caa3.zip kernel_samsung_tuna-156b5f172a64103bcb13b6d26288388b9019caa3.tar.gz kernel_samsung_tuna-156b5f172a64103bcb13b6d26288388b9019caa3.tar.bz2 |
tracing: typecast sizeof and offsetof to unsigned int
Impact: fix compiler warnings
On x86_64 sizeof and offsetof are treated as long, where as on x86_32
they are int. This patch typecasts them to unsigned int to avoid
one arch giving warnings while the other does not.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_export.c')
-rw-r--r-- | kernel/trace/trace_export.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index 0fb7be7..7162ab4 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c @@ -18,11 +18,11 @@ #include "trace_format.h" #undef TRACE_FIELD_ZERO_CHAR -#define TRACE_FIELD_ZERO_CHAR(item) \ - ret = trace_seq_printf(s, "\tfield: char " #item ";\t" \ - "offset:%lu;\tsize:0;\n", \ - offsetof(typeof(field), item)); \ - if (!ret) \ +#define TRACE_FIELD_ZERO_CHAR(item) \ + ret = trace_seq_printf(s, "\tfield: char " #item ";\t" \ + "offset:%u;\tsize:0;\n", \ + (unsigned int)offsetof(typeof(field), item)); \ + if (!ret) \ return 0; |