]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
types: Allow inodeno_t structs to alias.
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 22 Nov 2010 23:04:22 +0000 (15:04 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 22 Nov 2010 23:08:15 +0000 (15:08 -0800)
This removes a compiler warning that appeared in a gcc upgrade and
is apparently erroneous, about its usage violating strict-aliasing rules
when the + operator is used.

src/include/types.h

index b04d348985a47daf041b0ea33ba213e5dcdabff2..ef3572d54470f43906193699f675ad42409b7543 100644 (file)
@@ -294,7 +294,7 @@ struct inodeno_t {
   inodeno_t(_inodeno_t v) : val(v) {}
   inodeno_t operator+=(inodeno_t o) { val += o.val; return *this; }
   operator _inodeno_t() const { return val; }
-};
+} __attribute__ ((__may_alias__));
 
 inline void encode(inodeno_t i, bufferlist &bl) { encode(i.val, bl); }
 inline void decode(inodeno_t &i, bufferlist::iterator &p) { decode(i.val, p); }