Closed Bug 406113 Opened 17 years ago Closed 12 years ago

Little patch make MinGW gcc not complain

Categories

(Firefox :: Security, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 405297

People

(Reporter: Techrazy.Yang, Unassigned)

Details

Attachments

(1 file)

When compile Mozilla Firefox trunk source code with MinGW gcc 3.4.5, the compiler complain for the subtraction operation between unsigned char* and char* operand. So, I just convert them to unsigned int before subtraction. A little patch but make the MinGW buildable.
This patch is incorrect & will break on 64-bit compiling. The correct fix is to either typecast the unsigned char * to a char * or the char * to an unsigned char * (which way works better I dont know) which should allow the pointer subtraction to proceed. BTW, this bug is a duplicate of bug 405297 (which I earlier filed also with the same incorrect patch)
Oh, indeed when I compose this patch I did not consider 64-bit at all, thank you for your correction. And could you please tell me how this patch break the 64-bit? Thanks!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: