On Thu, Aug 19, 2021 at 4:51 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > The action in apply_dispatch is always a single byte so not sure why > we need %d here. Also, if it is used as %c before the patch then I > think it is better not to change it in this patch. >
As I explained before, the point is that all the known message types are handled in the switch statement cases (and you will get a compiler warning if you miss one of the enum values in the switch cases). So anything NOT handled in the switch, will be some OTHER value (and note that any "int" value can be assigned to an enum). Who says its value will be a printable character (%c) in this case? And even if it is printable, will it help? I think in this case it would be better to know the exact value of the byte ("%d" or "0x%x" etc.), not the character equivalent. I'm OK if it's done as a separate patch. Regards, Greg Nancarrow Fujitsu Australia