Hello Maciej:
This is regarding the Code analyzer issue reported on the
PxeBcDhcp4CallBack() and PxeBcDhcp6CallBack() functions of UEFIPXEBC Driver.
In both the functions the allowed event are
Dhcp4RcvdOffer, Dhcp4SelectOffer, Dhcp4SendDiscover, Dhcp4RcvdAck. If any other event comes as input it will exit in beginning itself.
if ((Dhcp4Event != Dhcp4RcvdOffer) &&
(Dhcp4Event != Dhcp4SelectOffer) &&
(Dhcp4Event != Dhcp4SendDiscover) &&
(Dhcp4Event != Dhcp4RcvdAck)) {
return EFI_SUCCESS;
Later below switch case handling the default case which is not reachable. This is applicable for both the callback functions.
switch (Dhcp4Event) {
default:
break;
}
I assume this code is a not reachable code and can be removed. Please feedback.
-Siva