Fix strict aliasing problems or add -fno-strict-aliasing
[openafs.git] / src / ptserver / ptclient.c
index cacf8c7..a62b579 100644 (file)
@@ -133,7 +133,9 @@ PrintEntry(afs_int32 ea, struct prentry *e, int indent)
 {
     /* handle screwed up versions of DumpEntry */
     if (e->flags & PRCONT) {
-       afs_int32 id = *(afs_int32 *) (e->name);
+       afs_int32 id;
+
+       memcpy(&id, e->name, sizeof(id));
        if ((id != PRBADID) && ((id > (1 << 24)) || (id < -(1 << 24)))) {
            /* assume server incorrectly swapped these bytes... */
            int i = 0;