[U-Boot] [RFC PATCH v2 2/7] net: dm: Ignore unknown env_op_* constants

Bernhard Nortmann bernhard.nortmann at web.de
Wed Nov 16 11:29:57 CET 2016


This prevents a possible compiler warning similar to
"net/eth-uclass.c:<line>:<pos>: warning: enumeration value
'env_op_*' not handled in switch [-Wswitch]".

Signed-off-by: Bernhard Nortmann <bernhard.nortmann at web.de>
Reviewed-by: Simon Glass <sjg at chromium.org>

---

Changes in v2:
- Add "Reviewed-by" sjg

 net/eth-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 1d13011..50e37da 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -231,6 +231,8 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
 			break;
 		case env_op_delete:
 			memset(pdata->enetaddr, 0, 6);
+		default:
+			break; /* ignore */
 		}
 	}
 
-- 
2.7.3



More information about the U-Boot mailing list