Summary: | Windows msvc compile problem | ||
---|---|---|---|
Product: | dbus | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | blocker | ||
Priority: | medium | CC: | hp, smcv |
Version: | 1.5 | Keywords: | patch |
Hardware: | Other | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Fix compilation of (no-op) alignment assertions on non-gcc |
Description
Ralf Habacker
2011-08-13 13:38:35 UTC
> The compile error is caused by the following line
> # define _DBUS_ASSERT_ALIGNMENT(type, op, val) do { } while (0)
The preprocessed code show the main cause - there is a do while loop outside of any function as shown below:
typedef struct { char _assertion[(sizeof (char) == 1) ? 1 : -1]; } _DBUS_STATIC_ASSERT_40;
do { } while (0);
Created attachment 50220 [details] [review] Fix compilation of (no-op) alignment assertions on non-gcc This patch should hopefully work? --- Subject: [PATCH] Fix compilation of (no-op) alignment assertions on non-gcc do {} while (0) isn't valid at file scope, so the non-gcc code path was broken; in particular, this affected MSVC. (In reply to comment #2) > Created an attachment (id=50220) [details] > Fix compilation of (no-op) alignment assertions on non-gcc > > This patch should hopefully work? > yes, I applied and pushed this patch according to your hints to upstream dbus-1.4 To be sure, now I have to merge dbus-1.4 into master and push master upstream ? (In reply to comment #3) > To be sure, now I have to merge dbus-1.4 into master and push master upstream ? Yes please. (In reply to comment #4) > (In reply to comment #3) > > To be sure, now I have to merge dbus-1.4 into master and push master upstream ? > > Yes please. done, merging worked as expected. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.