lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] cast increases required alignment of target type


From: Joe Dupre
Subject: [lwip-users] cast increases required alignment of target type
Date: Tue, 9 Mar 2010 18:14:25 -0500

I've had this warning since v1.3.1.  How can I make it go away?


static void
tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
{
  u16_t len;
  struct netif *netif;
  u32_t *opts;

  /* <snip> */
  
  opts = (u32_t *)(seg->tcphdr + 1);    <----WARNING: cast increases required 
alignment of target type
  if (seg->flags & TF_SEG_OPTS_MSS) {
    TCP_BUILD_MSS_OPTION( *opts);
    opts += 1;
  }


This is with arm-elf-gcc (yagarto build 20091018).
If I understand it correctly, the warning is because seg->tcp_hdr is not 
falling on a 32 bit boundary.
But I don't know how to correct this.

- Joe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]