Status: New
Labels: Type-Defect Priority-Medium

New issue 221 by gerd94706: Minor issue: Warning in coded_stream.h using gcc 3.4.6

What steps will reproduce the problem?
1. find a system that uses gcc 3.4.6 (others may display the same issue)
2. compile code (-Wall) that somehow ends up #includ'ing coded_stream.h
3. observe the warning

What is the expected output? What do you see instead?
No warning (ideally)

What version of the product are you using? On what operating system?
Red Hat Enterprise Linux AS release 4

Please provide any additional information below.

The result of BufferSize() (of type int) is compared with
sizeof(*value) (of type size_t).

gcc 3.4.6 complains about comparing signed with an unsigned.

I suggest to either cast the sizeof operator to int ((int) sizeof(*value))
or to make BufferSize return size_t.

Proposed fix is attached.

        protoc-warnings-diff.txt  981 bytes

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to