ftpd: fix aliasing warning from gcc-6.1.1
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 4 Feb 2018 22:55:14 +0000 (23:55 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 4 Feb 2018 22:55:14 +0000 (23:55 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/ftpd.c

index 833507ba1d1feab13bed1d1df7159deddd8906d4..dd0fc4e9216e8049b5114e684e5307228d27c768 100644 (file)
@@ -262,7 +262,7 @@ cmdio_write(uint32_t status_str, const char *str)
 static void
 cmdio_write_ok(unsigned status)
 {
-       *(uint32_t *) G.msg_ok = status;
+       *(bb__aliased_uint32_t *) G.msg_ok = status;
        xwrite(STDOUT_FILENO, G.msg_ok, sizeof("NNN " MSG_OK) - 1);
        if (G.verbose > 1)
                verbose_log(G.msg_ok);
@@ -273,7 +273,7 @@ cmdio_write_ok(unsigned status)
 static void
 cmdio_write_error(unsigned status)
 {
-       *(uint32_t *) G.msg_err = status;
+       *(bb__aliased_uint32_t *) G.msg_err = status;
        xwrite(STDOUT_FILENO, G.msg_err, sizeof("NNN " MSG_ERR) - 1);
        if (G.verbose > 0)
                verbose_log(G.msg_err);