mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-28 06:35:34 +07:00
journal: align byte-buffer that gets cased to an object
On Sun, Jul 15, 2012 at 2:00 PM, Koen Kooi <koen@dominion.thruhere.net> wrote: > | src/journal/sd-journal.c: In function 'sd_journal_process': > | src/journal/sd-journal.c:1891:21: warning: cast increases required alignment of target type [-Wcast-align] > | src/journal/sd-journal.c:1900:29: warning: cast increases required alignment of target type [-Wcast-align]
This commit is contained in:
parent
dbfd912258
commit
19d1e4eeb6
@ -1868,7 +1868,7 @@ static int determine_change(sd_journal *j) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_public_ int sd_journal_process(sd_journal *j) {
|
_public_ int sd_journal_process(sd_journal *j) {
|
||||||
uint8_t buffer[sizeof(struct inotify_event) + FILENAME_MAX];
|
uint8_t buffer[sizeof(struct inotify_event) + FILENAME_MAX] _alignas_(struct inotify_event);
|
||||||
bool got_something = false;
|
bool got_something = false;
|
||||||
|
|
||||||
if (!j)
|
if (!j)
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#define _hidden_ __attribute__ ((visibility("hidden")))
|
#define _hidden_ __attribute__ ((visibility("hidden")))
|
||||||
#define _weakref_(x) __attribute__((weakref(#x)))
|
#define _weakref_(x) __attribute__((weakref(#x)))
|
||||||
#define _introspect_(x) __attribute__((section("introspect." x)))
|
#define _introspect_(x) __attribute__((section("introspect." x)))
|
||||||
|
#define _alignas_(x) __attribute__((aligned(__alignof(x))))
|
||||||
|
|
||||||
#define XSTRINGIFY(x) #x
|
#define XSTRINGIFY(x) #x
|
||||||
#define STRINGIFY(x) XSTRINGIFY(x)
|
#define STRINGIFY(x) XSTRINGIFY(x)
|
||||||
|
Loading…
Reference in New Issue
Block a user