Skip to content

Commit

Permalink
addressing misc compiler warnings (client side)
Browse files Browse the repository at this point in the history
  • Loading branch information
divanchykhin committed Jun 25, 2015
1 parent 60e4fb2 commit 5998f17
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 745 deletions.
2 changes: 2 additions & 0 deletions firmware/src/common/sa_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ INLINE void zepto_memcpy( void* dest, const void* src, uint16_t cnt )
// debug helpers

#ifdef SA_DEBUG
#if !defined DEBUG_PRINTING
#define DEBUG_PRINTING
#endif
#endif

#ifdef DEBUG_PRINTING
#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions firmware/src/common/sagdp_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ uint8_t handler_sagdp_receive_up( sa_time_val* currt, waiting_for* wf, sasp_nonc
{
// if ACK is requested, send it
ZEPTO_DEBUG_ASSERT(0);
return SAGDP_RET_SYS_CORRUPTED; // just as long as not implemented
}
else
{
Expand Down Expand Up @@ -819,6 +820,7 @@ uint8_t handler_sagdp_receive_up( sa_time_val* currt, waiting_for* wf, sasp_nonc
{
// if ACK is requested, send it
ZEPTO_DEBUG_ASSERT(0);
return SAGDP_RET_SYS_CORRUPTED; // just as long as not implemented
}
else
{
Expand Down
11 changes: 6 additions & 5 deletions firmware/src/hal/hal_commlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ uint8_t send_message( MEMORY_HANDLE mem_h );
uint8_t try_get_message( MEMORY_HANDLE mem_h );
void keep_transmitter_on( bool keep_on );

#ifdef __cplusplus
}
#endif

//uint8_t wait_for_communication_event( MEMORY_HANDLE mem_h, uint16_t timeout );
//uint8_t wait_for_communication_event( uint16_t timeout );
#ifdef USED_AS_MASTER
uint8_t wait_for_communication_event( unsigned int timeout );
uint8_t try_get_message_within_master( MEMORY_HANDLE mem_h );
#ifdef USED_AS_MASTER_COMMSTACK
uint8_t send_to_central_unit( MEMORY_HANDLE mem_h );
#elif defined USED_AS_MASTER_CORE
Expand All @@ -59,6 +56,10 @@ uint8_t send_to_commm_stack( MEMORY_HANDLE mem_h );
#endif
#endif

#ifdef __cplusplus
}
#endif



#endif // __SA_COMMLAYER_H__
11 changes: 8 additions & 3 deletions firmware/src/hal/platforms/desktop/hal_commlayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,14 @@ uint8_t try_get_message( MEMORY_HANDLE mem_h )

#if (defined USED_AS_MASTER) && ( (defined USED_AS_MASTER_COMMSTACK) || (defined USED_AS_MASTER_CORE) )

const char* inet_addr_as_string_with_cl = "127.0.0.1";
#ifdef _MSC_VER
SOCKET sock_with_cl;
SOCKET sock_with_cl_accepted;
#else
int sock_with_cl;
int sock_with_cl_accepted;
#endif
const char* inet_addr_as_string_with_cl = "127.0.0.1";
struct sockaddr_in sa_self_with_cl, sa_other_with_cl;

#ifdef USED_AS_MASTER_COMMSTACK
Expand Down Expand Up @@ -524,10 +529,10 @@ uint8_t wait_for_communication_event( unsigned int timeout )
#ifdef USED_AS_MASTER_COMMSTACK
FD_SET(sock, &rfds);
FD_SET(sock_with_cl, &rfds);
fd_cnt = sock > sock_with_cl ? sock + 1 : sock_with_cl + 1;
fd_cnt = (int)(sock > sock_with_cl ? sock + 1 : sock_with_cl + 1);
#else
FD_SET(sock_with_cl, &rfds);
fd_cnt = sock_with_cl + 1;
fd_cnt = (int)(sock_with_cl + 1);
#endif
#else
FD_SET(sock, &rfds);
Expand Down
Loading

0 comments on commit 5998f17

Please sign in to comment.