{"thread":{"id":"46440","subject":"[PATCH] make get_be64() compile on pu with NO_UNALIGNED_LOADS","startedAt":"2017-07-22T09:47:48Z","lastAt":"2017-07-22T15:54:37Z","messageCount":2,"participants":["Martin Ågren","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"324894","messageId":"20170722094717.16305-1-martin.agren@gmail.com","threadId":"46440","inReplyTo":null,"subject":"[PATCH] make get_be64() compile on pu with NO_UNALIGNED_LOADS","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2017-07-22T09:47:17Z","receivedAt":"2017-07-22T09:47:48Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"1. s/unit64_t/uint64_t/\n\n2. add const-qualifier to *p\n\n3. add missing closing ')'\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\nApplies to pu and passes the tests. I think this should be squashed in\nsomewhere. Perhaps a mismerge in commit d553324d (\"Merge branch\n'bp/fsmonitor' into pu\", 2017-07-21).\n\n compat/bswap.h | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/compat/bswap.h b/compat/bswap.h\nindex 133da1d2b..f86110a72 100644\n--- a/compat/bswap.h\n+++ b/compat/bswap.h\n@@ -188,11 +188,11 @@ static inline void put_be32(void *ptr, uint32_t value)\n \tp[3] = value >>  0;\n }\n \n-static inline unit64_t get_be64(const void *ptr)\n+static inline uint64_t get_be64(const void *ptr)\n {\n-\tunsigned char *p = ptr;\n+\tconst unsigned char *p = ptr;\n \treturn  ((uint64_t)get_be32(p) << 32) |\n-\t\t((uint64_t)get_be32(p + 4);\n+\t\t((uint64_t)get_be32(p + 4));\n }\n \n #endif\n-- \n2.14.0.rc0.14.g12cc05b53\n\n"},{"id":"324901","messageId":"xmqq60ekfow8.fsf@gitster.mtv.corp.google.com","threadId":"46440","inReplyTo":"20170722094717.16305-1-martin.agren@gmail.com","subject":"Re: [PATCH] make get_be64() compile on pu with NO_UNALIGNED_LOADS","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-07-22T15:54:31Z","receivedAt":"2017-07-22T15:54:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Ågren <martin.agren@gmail.com> writes:\n\n> Applies to pu and passes the tests. I think this should be squashed in\n> somewhere. Perhaps a mismerge in commit d553324d (\"Merge branch\n> 'bp/fsmonitor' into pu\", 2017-07-21).\n\nYes, you spotted a mistaken evil-merge.  Thanks.\n\n>\n>  compat/bswap.h | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/compat/bswap.h b/compat/bswap.h\n> index 133da1d2b..f86110a72 100644\n> --- a/compat/bswap.h\n> +++ b/compat/bswap.h\n> @@ -188,11 +188,11 @@ static inline void put_be32(void *ptr, uint32_t value)\n>  \tp[3] = value >>  0;\n>  }\n>  \n> -static inline unit64_t get_be64(const void *ptr)\n> +static inline uint64_t get_be64(const void *ptr)\n>  {\n> -\tunsigned char *p = ptr;\n> +\tconst unsigned char *p = ptr;\n>  \treturn  ((uint64_t)get_be32(p) << 32) |\n> -\t\t((uint64_t)get_be32(p + 4);\n> +\t\t((uint64_t)get_be32(p + 4));\n>  }\n>  \n>  #endif\n"}]}