USNavalResearchLaboratory / protolib

Protean Protocol Prototyping Library

Home Page:https://www.nrl.navy.mil/itd/ncs/products/protolib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

protoPktIP:465 strange change => compile error

RocketRider opened this issue · comments

I tried building NORM with the latest protolib and get the following error:
protoPktIP.cpp:465:14: error: case value evaluates to -1, which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing]
case LENGTH_UNKNOWN:

I looked into the change and don't understand why you would change this. The switch is useless now. The new code seems incorrect:
cc94c5e

This change was a mistake that crept in with a recent update to that IPv4 header option code. Thanks catching this and reporting it. I have fixed the issue.