cmdline (merge-intel): fix compilation with icc
[libcmdline.git] / src / lib / cmdline_parse_etheraddr.c
index d718081..2cefc62 100644 (file)
@@ -98,12 +98,12 @@ my_ether_aton(const char *a)
        if (i != ETHER_ADDR_LEN)
                return NULL;
 
-       ether_addr.ea_oct[0] = o0;
-       ether_addr.ea_oct[1] = o1;
-       ether_addr.ea_oct[2] = o2;
-       ether_addr.ea_oct[3] = o3;
-       ether_addr.ea_oct[4] = o4;
-       ether_addr.ea_oct[5] = o5;
+       ether_addr.ea_oct[0] = (uint8_t)o0;
+       ether_addr.ea_oct[1] = (uint8_t)o1;
+       ether_addr.ea_oct[2] = (uint8_t)o2;
+       ether_addr.ea_oct[3] = (uint8_t)o3;
+       ether_addr.ea_oct[4] = (uint8_t)o4;
+       ether_addr.ea_oct[5] = (uint8_t)o5;
 
        return (struct ether_addr *)&ether_addr;
 }