cppcheck: fixes issues found in example/protocol
cppcheck: fixes issues found in example/protocol

(style) The scope of the variable 'X' can be reduced.
(warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?

duke8253/trafficserver,vmamidi/trafficserver,davidbz/trafficserver,bryancall/trafficserver,SolidWallOfCode/trafficserver,bryancall/trafficserver,pbchou/trafficserver,vmamidi/trafficserver,SolidWallOfCode/trafficserver,davidbz/trafficserver,dyrock/trafficserver,SolidWallOfCode/trafficserver,SolidWallOfCode/trafficserver,pbchou/trafficserver,bryancall/trafficserver,dyrock/trafficserver,davidbz/trafficserver,dyrock/trafficserver,davidbz/trafficserver,pbchou/trafficserver,duke8253/trafficserver,duke8253/trafficserver,davidbz/trafficserver,vmamidi/trafficserver,dyrock/trafficserver,SolidWallOfCode/trafficserver,vmamidi/trafficserver,bryancall/trafficserver,duke8253/trafficserver,dyrock/trafficserver,pbchou/trafficserver,bryancall/trafficserver,duke8253/trafficserver,dyrock/trafficserver,dyrock/trafficserver,davidbz/trafficserver,vmamidi/trafficserver,SolidWallOfCode/trafficserver,pbchou/trafficserver,pbchou/trafficserver,duke8253/trafficserver,bryancall/trafficserver,duke8253/trafficserver,vmamidi/trafficserver,SolidWallOfCode/trafficserver