[SSSD] [PATCH 4/7] responder: Use SAFEALIGN macros where appropriate.

Lukas Slebodnik lslebodn at redhat.com
Wed Jan 22 18:50:13 UTC 2014


On (19/11/13 14:01), Michal Židek wrote:
>On 11/18/2013 04:02 PM, Lukas Slebodnik wrote:
>>Few warnings are not fixed in the file src/responder/nss/nsssrv_cmd.c
>>and patches {0005, 0006} do not change this file.
>>
>>   CC       src/responder/nss/nsssrv_cmd.o
>>src/responder/nss/nsssrv_cmd.c:1017:6: warning: cast from 'uint8_t *' (aka 'unsigned char *') to
>>       'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
>>     ((uint32_t *)body)[0] = 1; /* num results */
>>      ^~~~~~~~~~~~~~~~
>>src/responder/nss/nsssrv_cmd.c:1018:6: warning: cast from 'uint8_t *' (aka 'unsigned char *') to
>>       'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
>>     ((uint32_t *)body)[1] = 0; /* reserved */
>>      ^~~~~~~~~~~~~~~~
>>src/responder/nss/nsssrv_cmd.c:1019:6: warning: cast from 'uint8_t *' (aka 'unsigned char *') to
>>       'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
>>     ((uint32_t *)body)[2] = (uint32_t) SSS_ID_TYPE_GID;
>>      ^~~~~~~~~~~~~~~~
>>src/responder/nss/nsssrv_cmd.c:4400:6: warning: cast from 'uint8_t *' (aka 'unsigned char *') to
>>       'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
>>     ((uint32_t *)body)[0] = 1; /* num results */
>>      ^~~~~~~~~~~~~~~~
>>src/responder/nss/nsssrv_cmd.c:4401:6: warning: cast from 'uint8_t *' (aka 'unsigned char *') to
>>       'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
>>     ((uint32_t *)body)[1] = 0; /* reserved */
>>      ^~~~~~~~~~~~~~~~
>>src/responder/nss/nsssrv_cmd.c:4402:6: warning: cast from 'uint8_t *' (aka 'unsigned char *') to
>>       'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
>>     ((uint32_t *)body)[2] = (uint32_t) SSS_ID_TYPE_GID;
>>      ^~~~~~~~~~~~~~~~
>>6 warnings generated.
>>
>>LS
>>_______________________________________________
>>sssd-devel mailing list
>>sssd-devel at lists.fedorahosted.org
>>https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>>
>
>Thanks. For the review. New patch is attached.
>
>Michal

>From 3cdb7e7640630f28ac7d766459d57bb509e9ee9e Mon Sep 17 00:00:00 2001
>From: Michal Zidek <mzidek at redhat.com>
>Date: Wed, 28 Aug 2013 12:46:58 +0200
>Subject: [PATCH] responder: Use SAFEALIGN macros where appropriate.
>
This patch needs to be rebased.

LS



More information about the sssd-devel mailing list