- Build: Supress -Wcast-align warnings/errors on arm and ppc64le (bnc#845525)
* Update pacemaker-Wno-cast-align.patch OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=101
This commit is contained in:
parent
ad12ec0648
commit
62a0c904df
@ -1,13 +1,102 @@
|
||||
Index: pacemaker/lib/common/Makefile.am
|
||||
===================================================================
|
||||
--- pacemaker.orig/lib/common/Makefile.am
|
||||
+++ pacemaker/lib/common/Makefile.am
|
||||
@@ -32,6 +32,8 @@ lib_LTLIBRARIES = libcrmcommon.la
|
||||
commit 5e0e36364e242029717ef5bd2061344b8e38e7d2
|
||||
Author: Gao,Yan <ygao@suse.com>
|
||||
Date: Sat Jan 25 14:30:25 2014 +0800
|
||||
|
||||
Build: Suppress -Wcast-align warnings/errors on arm and ppc64le
|
||||
|
||||
diff --git a/lib/common/ipc.c b/lib/common/ipc.c
|
||||
index 3d34706..d7b525f 100644
|
||||
--- a/lib/common/ipc.c
|
||||
+++ b/lib/common/ipc.c
|
||||
@@ -894,7 +894,7 @@ crm_ipc_ready(crm_ipc_t * client)
|
||||
static int
|
||||
crm_ipc_decompress(crm_ipc_t * client)
|
||||
{
|
||||
- struct crm_ipc_response_header *header = (struct crm_ipc_response_header *)client->buffer;
|
||||
+ struct crm_ipc_response_header *header = (struct crm_ipc_response_header *)(void *)client->buffer;
|
||||
|
||||
CFLAGS = $(CFLAGS_COPY:-Wcast-qual=) -fPIC
|
||||
if (header->size_compressed) {
|
||||
int rc = 0;
|
||||
@@ -926,7 +926,7 @@ crm_ipc_decompress(crm_ipc_t * client)
|
||||
CRM_ASSERT(size_u == header->size_uncompressed);
|
||||
|
||||
memcpy(uncompressed, client->buffer, hdr_offset); /* Preserve the header */
|
||||
- header = (struct crm_ipc_response_header *)uncompressed;
|
||||
+ header = (struct crm_ipc_response_header *)(void *)uncompressed;
|
||||
|
||||
free(client->buffer);
|
||||
client->buf_size = new_buf_size;
|
||||
@@ -957,7 +957,7 @@ crm_ipc_read(crm_ipc_t * client)
|
||||
return rc;
|
||||
}
|
||||
|
||||
- header = (struct crm_ipc_response_header *)client->buffer;
|
||||
+ header = (struct crm_ipc_response_header *)(void *)client->buffer;
|
||||
if(header->version > PCMK_IPC_VERSION) {
|
||||
crm_err("Filtering incompatible v%d IPC message, we only support versions <= %d",
|
||||
header->version, PCMK_IPC_VERSION);
|
||||
@@ -1044,7 +1044,7 @@ internal_ipc_get_reply(crm_ipc_t * client, int request_id, int ms_timeout)
|
||||
return rc;
|
||||
}
|
||||
|
||||
- hdr = (struct crm_ipc_response_header *)client->buffer;
|
||||
+ hdr = (struct crm_ipc_response_header *)(void *)client->buffer;
|
||||
if (hdr->qb.id == request_id) {
|
||||
/* Got it */
|
||||
break;
|
||||
@@ -1173,7 +1173,7 @@ crm_ipc_send(crm_ipc_t * client, xmlNode * message, enum crm_ipc_flags flags, in
|
||||
}
|
||||
|
||||
if (rc > 0) {
|
||||
- struct crm_ipc_response_header *hdr = (struct crm_ipc_response_header *)client->buffer;
|
||||
+ struct crm_ipc_response_header *hdr = (struct crm_ipc_response_header *)(void *)client->buffer;
|
||||
|
||||
crm_trace("Received response %d, size=%d, rc=%ld, text: %.200s", hdr->qb.id, hdr->qb.size,
|
||||
rc, crm_ipc_buffer(client));
|
||||
diff --git a/lib/common/remote.c b/lib/common/remote.c
|
||||
index acffccb..02099e6 100644
|
||||
--- a/lib/common/remote.c
|
||||
+++ b/lib/common/remote.c
|
||||
@@ -353,7 +353,7 @@ crm_remote_send(crm_remote_t * remote, xmlNode * msg)
|
||||
header->size_total = iov[0].iov_len + iov[1].iov_len;
|
||||
|
||||
crm_trace("Sending len[0]=%d, start=%x\n",
|
||||
- (int)iov[0].iov_len, *(int*)xml_text);
|
||||
+ (int)iov[0].iov_len, *(int*)(void *)xml_text);
|
||||
rc = crm_remote_sendv(remote, iov, 2);
|
||||
if (rc < 0) {
|
||||
crm_err("Failed to send remote msg, rc = %d", rc);
|
||||
@@ -861,13 +861,13 @@ crm_remote_tcp_connect_async(const char *host, int port, int timeout, /*ms */
|
||||
|
||||
memset(buffer, 0, DIMOF(buffer));
|
||||
if (addr->sa_family == AF_INET6) {
|
||||
- struct sockaddr_in6 *addr_in = (struct sockaddr_in6 *)addr;
|
||||
+ struct sockaddr_in6 *addr_in = (struct sockaddr_in6 *)(void *)addr;
|
||||
|
||||
addr_in->sin6_port = htons(port);
|
||||
inet_ntop(addr->sa_family, &addr_in->sin6_addr, buffer, DIMOF(buffer));
|
||||
|
||||
} else {
|
||||
- struct sockaddr_in *addr_in = (struct sockaddr_in *)addr;
|
||||
+ struct sockaddr_in *addr_in = (struct sockaddr_in *)(void *)addr;
|
||||
|
||||
addr_in->sin_port = htons(port);
|
||||
inet_ntop(addr->sa_family, &addr_in->sin_addr, buffer, DIMOF(buffer));
|
||||
diff --git a/lrmd/tls_backend.c b/lrmd/tls_backend.c
|
||||
index 1600353..32d761f 100644
|
||||
--- a/lrmd/tls_backend.c
|
||||
+++ b/lrmd/tls_backend.c
|
||||
@@ -264,11 +264,11 @@ bind_and_listen(struct addrinfo *addr)
|
||||
char buffer[256] = { 0, };
|
||||
|
||||
if (addr->ai_family == AF_INET6) {
|
||||
- struct sockaddr_in6 *addr_in = (struct sockaddr_in6 *)addr->ai_addr;
|
||||
+ struct sockaddr_in6 *addr_in = (struct sockaddr_in6 *)(void *)addr->ai_addr;
|
||||
inet_ntop(addr->ai_family, &addr_in->sin6_addr, buffer, DIMOF(buffer));
|
||||
|
||||
} else {
|
||||
- struct sockaddr_in *addr_in = (struct sockaddr_in *)addr->ai_addr;
|
||||
+ struct sockaddr_in *addr_in = (struct sockaddr_in *)(void *)addr->ai_addr;
|
||||
inet_ntop(addr->ai_family, &addr_in->sin_addr, buffer, DIMOF(buffer));
|
||||
}
|
||||
|
||||
+ipc.lo remote.lo: CFLAGS += -Wno-cast-align
|
||||
+
|
||||
libcrmcommon_la_SOURCES = ipc.c utils.c xml.c iso8601.c remote.c mainloop.c logging.c
|
||||
if BUILD_CIBSECRETS
|
||||
libcrmcommon_la_SOURCES += cib_secrets.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 25 06:22:21 UTC 2014 - ygao@suse.com
|
||||
|
||||
- Build: Supress -Wcast-align warnings/errors on arm and ppc64le (bnc#845525)
|
||||
* Update pacemaker-Wno-cast-align.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 25 01:22:06 UTC 2014 - ygao@suse.com
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user