Skip to content

Commit

Permalink
Eliminate unused variable warnings. Dummy test of PT_YIELD_FLAG does …
Browse files Browse the repository at this point in the history
…not change program size.
  • Loading branch information
dak664 committed Feb 21, 2012
1 parent ea3d427 commit 745f071
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
7 changes: 3 additions & 4 deletions core/net/mac/cxmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*
* This file is part of the Contiki operating system.
*
* $Id: cxmac.c,v 1.15 2010/10/03 20:37:32 adamdunkels Exp $
*/

/**
Expand Down Expand Up @@ -421,7 +420,7 @@ send_packet(void)
uint8_t strobe[MAX_STROBE_SIZE];
int strobe_len, len;
int is_broadcast = 0;
int is_reliable;
/*int is_reliable;*/
struct encounter *e;
struct queuebuf *packet;
int is_already_streaming = 0;
Expand Down Expand Up @@ -450,8 +449,8 @@ send_packet(void)
packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[1]);
#endif /* UIP_CONF_IPV6 */
}
is_reliable = packetbuf_attr(PACKETBUF_ATTR_RELIABLE) ||
packetbuf_attr(PACKETBUF_ATTR_ERELIABLE);
/* is_reliable = packetbuf_attr(PACKETBUF_ATTR_RELIABLE) ||
packetbuf_attr(PACKETBUF_ATTR_ERELIABLE);*/
len = NETSTACK_FRAMER.create();
strobe_len = len + sizeof(struct cxmac_hdr);
if(len < 0 || strobe_len > (int)sizeof(strobe)) {
Expand Down
7 changes: 3 additions & 4 deletions core/net/mac/xmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*
* This file is part of the Contiki operating system.
*
* $Id: xmac.c,v 1.60 2011/01/25 14:31:09 adamdunkels Exp $
*/

/**
Expand Down Expand Up @@ -463,7 +462,7 @@ send_packet(void)
uint8_t strobe[MAX_STROBE_SIZE];
int strobe_len, len;
int is_broadcast = 0;
int is_reliable;
/*int is_reliable; */
struct encounter *e;
struct queuebuf *packet;
int is_already_streaming = 0;
Expand Down Expand Up @@ -491,8 +490,8 @@ send_packet(void)
packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[1]);
#endif /* UIP_CONF_IPV6 */
}
is_reliable = packetbuf_attr(PACKETBUF_ATTR_RELIABLE) ||
packetbuf_attr(PACKETBUF_ATTR_ERELIABLE);
/* is_reliable = packetbuf_attr(PACKETBUF_ATTR_RELIABLE) ||
packetbuf_attr(PACKETBUF_ATTR_ERELIABLE); */

packetbuf_set_attr(PACKETBUF_ATTR_MAC_ACK, 1);
len = NETSTACK_FRAMER.create();
Expand Down
3 changes: 1 addition & 2 deletions core/net/rime/collect.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
*
* This file is part of the Contiki operating system.
*
* $Id: collect.c,v 1.73 2011/01/18 16:05:53 adamdunkels Exp $
*/

/**
Expand Down Expand Up @@ -126,7 +125,7 @@ struct ack_msg {
full, incoming packets are dropped instead of being forwarded. */
#define MAX_MAC_REXMITS 2
#define MAX_ACK_MAC_REXMITS 5
#define REXMIT_TIME CLOCK_SECOND * 32 / NETSTACK_RDC_CHANNEL_CHECK_RATE
#define REXMIT_TIME (CLOCK_SECOND * 32 / NETSTACK_RDC_CHANNEL_CHECK_RATE)
#define FORWARD_PACKET_LIFETIME_BASE REXMIT_TIME * 2
#define MAX_SENDING_QUEUE 3 * QUEUEBUF_NUM / 4
#define MIN_AVAILABLE_QUEUE_ENTRIES 4
Expand Down
3 changes: 1 addition & 2 deletions core/sys/pt.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
*
* Author: Adam Dunkels <[email protected]>
*
* $Id: pt.h,v 1.3 2008/10/14 12:46:39 nvt-se Exp $
*/

/**
Expand Down Expand Up @@ -112,7 +111,7 @@ struct pt {
*
* \hideinitializer
*/
#define PT_BEGIN(pt) { char PT_YIELD_FLAG = 1; LC_RESUME((pt)->lc)
#define PT_BEGIN(pt) { char PT_YIELD_FLAG = 1; if (PT_YIELD_FLAG) {;} LC_RESUME((pt)->lc)

/**
* Declare the end of a protothread.
Expand Down

0 comments on commit 745f071

Please sign in to comment.