summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2012-11-18 14:55:10 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-12-17 10:43:58 +0100
commite683136da1b2f0961e19b35634bea7f31ee310ac (patch)
tree0f2fed134bb75ab736312a0a8331d666071fbe48 /src/libudev
parent378cf88f72a9cda84baf703ed24f54c8c539fdcf (diff)
Fix "attribute 'packed' is ignored" warnings when using Clang
Clang 3.1 warned that "attribute 'packed' is ignored". This stems from placing "__attribute__ ((packed))" at the start of structure declarations when common practice is to place it at the end. Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/libudev-hwdb-def.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libudev/libudev-hwdb-def.h b/src/libudev/libudev-hwdb-def.h
index e167e2805b..b76a13f3e4 100644
--- a/src/libudev/libudev-hwdb-def.h
+++ b/src/libudev/libudev-hwdb-def.h
@@ -25,7 +25,7 @@
#define HWDB_SIG { 'K', 'S', 'L', 'P', 'H', 'H', 'R', 'H' }
/* on-disk trie objects */
-_packed_ struct trie_header_f {
+struct trie_header_f {
uint8_t signature[8];
/* version of tool which created the file */
@@ -44,9 +44,9 @@ _packed_ struct trie_header_f {
/* size of the nodes and string section */
le64_t nodes_len;
le64_t strings_len;
-};
+} _packed_;
-_packed_ struct trie_node_f {
+struct trie_node_f {
/* prefix of lookup string, shared by all children */
le64_t prefix_off;
/* size of children entry array appended to the node */
@@ -54,21 +54,21 @@ _packed_ struct trie_node_f {
uint8_t padding[7];
/* size of value entry array appended to the node */
le64_t values_count;
-};
+} _packed_;
/* array of child entries, follows directly the node record */
-_packed_ struct trie_child_entry_f {
+struct trie_child_entry_f {
/* index of the child node */
uint8_t c;
uint8_t padding[7];
/* offset of the child node */
le64_t child_off;
-};
+} _packed_;
/* array of value entries, follows directly the node record/child array */
-_packed_ struct trie_value_entry_f {
+struct trie_value_entry_f {
le64_t key_off;
le64_t value_off;
-};
+} _packed_;
#endif