rpi3-xenomai
rpi3-xenomai copied to clipboard
error "strncpy" when make tools
error: ‘strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation] strncpy(ifr.ifr_name, txdev, IFNAMSIZ);
my solution is replace strncpy to snprintf. Ex :
- strncpy (ifr.ifr_name, argv[1], IFNAMSIZ);
- snprintf(ifr.ifr_name, IFNAMSIZ, "%s", argv[1]);