Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2012 18:08:15 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r234735 - stable/9/sys/dev/nxge
Message-ID:  <201204271808.q3RI8FR1018076@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Apr 27 18:08:15 2012
New Revision: 234735
URL: http://svn.freebsd.org/changeset/base/234735

Log:
  MFC r234506:
  
  Fix the following compilation warnings in nxge(4):
  
    sys/dev/nxge/if_nxge.c:1276:11: error: case value not in enumerated type 'xge_hal_event_e' (aka 'enum xge_hal_event_e') [-Werror,-Wswitch]
              case XGE_LL_EVENT_TRY_XMIT_AGAIN:
                   ^
    sys/dev/nxge/if_nxge.c:1289:11: error: case value not in enumerated type 'xge_hal_event_e' (aka 'enum xge_hal_event_e') [-Werror,-Wswitch]
              case XGE_LL_EVENT_DEVICE_RESETTING:
                   ^
  
  This is because the switch uses xge_queue_item_t::event_type, which is
  an enum xge_hal_event_e, while the XGE_LL_EVENT_xx values are of the
  enum xge_event_e.
  
  Since messing around with the enum definitions is too disruptive, the
  simplest fix is to cast the argument of the switch to int.
  
  Reviewed by:	gnn

Modified:
  stable/9/sys/dev/nxge/if_nxge.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/nxge/if_nxge.c
==============================================================================
--- stable/9/sys/dev/nxge/if_nxge.c	Fri Apr 27 18:05:24 2012	(r234734)
+++ stable/9/sys/dev/nxge/if_nxge.c	Fri Apr 27 18:08:15 2012	(r234735)
@@ -1272,7 +1272,7 @@ xge_callback_event(xge_queue_item_t *ite
 	lldev  = xge_hal_device_private(hldev);
 	ifnetp = lldev->ifnetp;
 
-	switch(item->event_type) {
+	switch((int)item->event_type) {
 	    case XGE_LL_EVENT_TRY_XMIT_AGAIN:
 	        if(lldev->initialized) {
 	            if(xge_hal_channel_dtr_count(lldev->fifo_channel[0]) > 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204271808.q3RI8FR1018076>