1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/sys/contrib
Dimitry Andric a511762672 Fix the following compilation warnings in sys/contrib/rdma/rdma_cma.c:
sys/contrib/rdma/rdma_cma.c:1259:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
	      case ECONNRESET:
		   ^
  @/sys/errno.h:118:20: note: expanded from macro 'ECONNRESET'
  #define ECONNRESET      54              /* Connection reset by peer */
		      ^
  sys/contrib/rdma/rdma_cma.c:1263:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
	      case ETIMEDOUT:
		   ^
  @/sys/errno.h:124:19: note: expanded from macro 'ETIMEDOUT'
  #define ETIMEDOUT       60              /* Operation timed out */
		      ^
  sys/contrib/rdma/rdma_cma.c:1260:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch]
	      case ECONNREFUSED:
		   ^
  @/sys/errno.h:125:22: note: expanded from macro 'ECONNREFUSED'
  #define ECONNREFUSED    61              /* Connection refused */
		      ^

This is because the switch uses iw_cm_event::status, which is an enum
iw_cm_event_status, while ECONNRESET, ETIMEDOUT and ECONNREFUSED are
just plain defines from errno.h.

It looks like there is only one use of any of the enumeration values of
iw_cm_event_status, in:

  sys/contrib/rdma/rdma_iwcm.c: 	if (iw_event->status == IW_CM_EVENT_STATUS_ACCEPTED) {

So messing around with the enum definitions to fix the warning seems too
disruptive; the simplest fix is to cast the argument of the switch to
int.

Reviewed by:	kmacy
MFC after:	1 week
2012-04-20 21:52:57 +00:00
..
altq/altq Update packet filter (pf) code to OpenBSD 4.5. 2011-06-28 11:57:25 +00:00
dev MFV: r233615 2012-03-28 17:21:59 +00:00
ia64/libuwx
ipfilter/netinet Adjust a few old checks to use __FreeBSD_version macro to 2011-11-24 21:23:58 +00:00
libfdt Provide kernel level headers for the libfdt code. 2010-06-02 17:24:41 +00:00
ngatm In sys/contrib/ngatm/netnatm/msg/uni_ie.c, use a more appropriate way to 2011-12-15 23:47:36 +00:00
octeon-sdk Remove some files not used by the FreeBSD kernel which have been adding quite 2012-03-13 06:48:26 +00:00
pf Fix VIMAGE build. 2012-04-05 04:41:06 +00:00
rdma Fix the following compilation warnings in sys/contrib/rdma/rdma_cma.c: 2012-04-20 21:52:57 +00:00
x86emu Integrate OpenBSD rev 1.5 of x86emu.c. 2010-03-09 22:42:24 +00:00
xz-embedded Update contrib/xz-embedded to build with new GEOM_UNCOMPRESS module. 2012-01-04 23:26:22 +00:00