[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #48308] Warnings in PPP van Jacobsen code when compili
From: |
Dirk Ziegelmeier |
Subject: |
[lwip-devel] [bug #48308] Warnings in PPP van Jacobsen code when compiling with clang |
Date: |
Fri, 24 Jun 2016 19:27:56 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 |
URL:
<http://savannah.nongnu.org/bugs/?48308>
Summary: Warnings in PPP van Jacobsen code when compiling
with clang
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: dziegel
Submitted on: Fri 24 Jun 2016 07:27:54 PM GMT
Category: PPP
Severity: 3 - Normal
Item Group: Compiler Warning
Status: None
Privacy: Public
Assigned to: gradator
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: git head
_______________________________________________________
Details:
clang -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point
-Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual
-Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align
-Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address
-Wunreachable-code -Wuninitialized -Wno-format -I. -I../../../..
-I../../../../../lwip/src/include -I../../../../ports/unix/include -c
../../../../../lwip/src/netif/ppp/vj.c
../../../../../lwip/src/netif/ppp/vj.c:165:28: error: cast from 'struct ip_hdr
*' to 'u32_t *' (aka 'unsigned int *') increases required alignment from 1 to
4 [-Werror,-Wcast-align]
th = (struct tcp_hdr *)&((u32_t*)ip)[ilen];
^~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:203:11: error: cast from 'struct
tcp_hdr *' to 'u32_t *' (aka 'unsigned int *') increases required alignment
from 1 to 4 [-Werror,-Wcast-align]
|| *(u32_t*)th != ((u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
^~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:203:26: error: cast from 'struct ip_hdr
*' to 'u32_t *' (aka 'unsigned int *') increases required alignment from 1 to
4 [-Werror,-Wcast-align]
|| *(u32_t*)th != ((u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
^~~~~~~~~~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:224:15: error: cast from 'struct
tcp_hdr *' to 'u32_t *' (aka 'unsigned int *') increases required alignment
from 1 to 4 [-Werror,-Wcast-align]
&& *(u32_t*)th == ((u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
^~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:224:30: error: cast from 'struct ip_hdr
*' to 'u32_t *' (aka 'unsigned int *') increases required alignment from 1 to
4 [-Werror,-Wcast-align]
&& *(u32_t*)th == ((u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
^~~~~~~~~~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:254:29: error: cast from 'struct ip_hdr
*' to 'u32_t *' (aka 'unsigned int *') increases required alignment from 1 to
4 [-Werror,-Wcast-align]
oth = (struct tcp_hdr *)&((u32_t*)&cs->cs_ip)[ilen];
^~~~~~~~~~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:268:8: error: cast from 'struct ip_hdr
*' to 'u16_t *' (aka 'unsigned short *') increases required alignment from 1
to 2 [-Werror,-Wcast-align]
if (((u16_t*)ip)[0] != ((u16_t*)&cs->cs_ip)[0]
^~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:268:27: error: cast from 'struct ip_hdr
*' to 'u16_t *' (aka 'unsigned short *') increases required alignment from 1
to 2 [-Werror,-Wcast-align]
if (((u16_t*)ip)[0] != ((u16_t*)&cs->cs_ip)[0]
^~~~~~~~~~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:269:11: error: cast from 'struct ip_hdr
*' to 'u16_t *' (aka 'unsigned short *') increases required alignment from 1
to 2 [-Werror,-Wcast-align]
|| ((u16_t*)ip)[3] != ((u16_t*)&cs->cs_ip)[3]
^~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:269:30: error: cast from 'struct ip_hdr
*' to 'u16_t *' (aka 'unsigned short *') increases required alignment from 1
to 2 [-Werror,-Wcast-align]
|| ((u16_t*)ip)[3] != ((u16_t*)&cs->cs_ip)[3]
^~~~~~~~~~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:270:11: error: cast from 'struct ip_hdr
*' to 'u16_t *' (aka 'unsigned short *') increases required alignment from 1
to 2 [-Werror,-Wcast-align]
|| ((u16_t*)ip)[4] != ((u16_t*)&cs->cs_ip)[4]
^~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:270:30: error: cast from 'struct ip_hdr
*' to 'u16_t *' (aka 'unsigned short *') increases required alignment from 1
to 2 [-Werror,-Wcast-align]
|| ((u16_t*)ip)[4] != ((u16_t*)&cs->cs_ip)[4]
^~~~~~~~~~~~~~~~~~
../../../../../lwip/src/netif/ppp/vj.c:591:8: error: cast from 'struct ip_hdr
*' to 'u16_t *' (aka 'unsigned short *') increases required alignment from 1
to 2 [-Werror,-Wcast-align]
bp = (u16_t*) &cs->cs_ip;
^~~~~~~~~~~~~~~~~~~
13 errors generated.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?48308>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #48308] Warnings in PPP van Jacobsen code when compiling with clang,
Dirk Ziegelmeier <=
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Sylvain Rochet, 2016/06/26
- Message not available
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Dirk Ziegelmeier, 2016/06/28
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Sylvain Rochet, 2016/06/28
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Dirk Ziegelmeier, 2016/06/28
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Dirk Ziegelmeier, 2016/06/28
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Dirk Ziegelmeier, 2016/06/28
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Sylvain Rochet, 2016/06/28
- [lwip-devel] [bug #48308] Warnings in PPP Van Jacobson code when compiling with clang, Dirk Ziegelmeier, 2016/06/29