INET: fix a few GCC compilation warnings
This commit is contained in:
		
							parent
							
								
									71634240a0
								
							
						
					
					
						commit
						224a0f6e90
					
				@ -15,10 +15,14 @@ SRCS=	buf.c clock.c inet.c inet_config.c \
 | 
			
		||||
DPADD+=	${LIBCHARDRIVER} ${LIBSYS} ${LIBMINIXUTIL}
 | 
			
		||||
LDADD+=	-lchardriver -lsys -lminixutil
 | 
			
		||||
 | 
			
		||||
.if ${COMPILER_TYPE} == "gnu"
 | 
			
		||||
LDADD+= -lc
 | 
			
		||||
.endif
 | 
			
		||||
 | 
			
		||||
MAN=
 | 
			
		||||
 | 
			
		||||
BINDIR?= /usr/sbin
 | 
			
		||||
 | 
			
		||||
CPPFLAGS+=  -I${.CURDIR} -D_MINIX
 | 
			
		||||
CPPFLAGS+=  -I${.CURDIR} -D_MINIX -Wall -Werror
 | 
			
		||||
 | 
			
		||||
.include <minix.service.mk>
 | 
			
		||||
 | 
			
		||||
@ -227,9 +227,8 @@ int bf_linkcheck ARGS(( acc_t *acc ));
 | 
			
		||||
 * the underlying buffer.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#define ptr2acc_data(/* acc_t * */ a) (bf_temporary_acc=(a), \
 | 
			
		||||
	(&bf_temporary_acc->acc_buffer->buf_data_p[bf_temporary_acc-> \
 | 
			
		||||
		acc_offset]))
 | 
			
		||||
#define ptr2acc_data(/* acc_t * */ a) (&((acc_t *)(a))->acc_buffer-> \
 | 
			
		||||
				buf_data_p[((acc_t *)(a))->acc_offset])
 | 
			
		||||
 | 
			
		||||
#define bf_chkbuf(buf) ((buf)? (compare((buf)->acc_linkC,>,0), \
 | 
			
		||||
	compare((buf)->acc_buffer, !=, 0), \
 | 
			
		||||
 | 
			
		||||
@ -213,7 +213,7 @@ SYN-SENT:
 | 
			
		||||
		if (tcp_hdr_flags & THF_ACK)
 | 
			
		||||
		{
 | 
			
		||||
			if (tcp_LEmod4G(seg_ack, tcp_conn->tc_ISS) ||
 | 
			
		||||
				tcp_Gmod4G(seg_ack, tcp_conn->tc_SND_NXT))
 | 
			
		||||
				tcp_Gmod4G(seg_ack, tcp_conn->tc_SND_NXT)) {
 | 
			
		||||
				if (tcp_hdr_flags & THF_RST)
 | 
			
		||||
					break;
 | 
			
		||||
				else
 | 
			
		||||
@ -227,6 +227,7 @@ SYN-SENT:
 | 
			
		||||
					tcp_conn_write(tcp_conn, 1);
 | 
			
		||||
					break;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			acceptable_ACK= (tcp_LEmod4G(tcp_conn->tc_SND_UNA,
 | 
			
		||||
				seg_ack) && tcp_LEmod4G(seg_ack,
 | 
			
		||||
				tcp_conn->tc_SND_NXT));
 | 
			
		||||
 | 
			
		||||
@ -874,11 +874,12 @@ udp_fd_t *udp_fd;
 | 
			
		||||
	result= (*udp_fd->uf_put_userdata)(udp_fd->uf_srfd,
 | 
			
		||||
		(size_t)0, pack, FALSE);
 | 
			
		||||
 | 
			
		||||
	if (result >= 0)
 | 
			
		||||
	if (result >= 0) {
 | 
			
		||||
		if (size > transf_size)
 | 
			
		||||
			result= EPACKSIZE;
 | 
			
		||||
		else
 | 
			
		||||
			result= transf_size;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	udp_fd->uf_flags &= ~UFF_READ_IP;
 | 
			
		||||
	result= (*udp_fd->uf_put_userdata)(udp_fd->uf_srfd, result,
 | 
			
		||||
 | 
			
		||||
@ -247,7 +247,7 @@ static unsigned number(char *str, unsigned max)
 | 
			
		||||
 | 
			
		||||
void read_conf(void)
 | 
			
		||||
{
 | 
			
		||||
	int i, j, ifno, type, port, enable;
 | 
			
		||||
	int i, j, ifno = -1, type = -1, port = -1, enable;
 | 
			
		||||
	struct eth_conf *ecp;
 | 
			
		||||
	struct psip_conf *pcp;
 | 
			
		||||
	struct ip_conf *icp;
 | 
			
		||||
@ -304,8 +304,7 @@ void read_conf(void)
 | 
			
		||||
			}
 | 
			
		||||
			ecp++;
 | 
			
		||||
			eth_conf_nr++;
 | 
			
		||||
		} else
 | 
			
		||||
		if (strncmp(word, "psip", 4) == 0) {
 | 
			
		||||
		} else if (strncmp(word, "psip", 4) == 0) {
 | 
			
		||||
			pcp->pc_ifno= ifno= number(word+4, IP_PORT_MAX-1);
 | 
			
		||||
			type= NETTYPE_PSIP;
 | 
			
		||||
			port= psip_conf_nr;
 | 
			
		||||
@ -315,6 +314,12 @@ void read_conf(void)
 | 
			
		||||
			printf("inet: Unknown device '%s'\n", word);
 | 
			
		||||
			error();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (type == -1 || ifno == -1 || port == -1) {
 | 
			
		||||
			printf("inet: faulty configuration\n");
 | 
			
		||||
			exit(1);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		iftype[ifno]= type;
 | 
			
		||||
		icp->ic_ifno= ifno;
 | 
			
		||||
		icp->ic_devtype= type;
 | 
			
		||||
 | 
			
		||||
@ -118,7 +118,7 @@ PUBLIC void sr_rec(m)
 | 
			
		||||
mq_t *m;
 | 
			
		||||
{
 | 
			
		||||
	int result;
 | 
			
		||||
	int send_reply, free_mess;
 | 
			
		||||
	int send_reply = 0, free_mess = 0;
 | 
			
		||||
 | 
			
		||||
	if (repl_queue)
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user