<i>malloc routines use wrong cast</i> status still Open with 4 other changes
by
.
D 2001-08-08T03:17:12
J icomment Logged\sIn:\sYES\s\nuser_id=286923\n\nThe\smain\sproblem\sseems\sto\sbe\sthat\sthe\ssize_t\svariables\sare\sdeclared\sas\s"(unsigned)"\swhich\sdefaults\sto\s\n"unsigned\sint".\sgcc\spoints\sout\sthat\sthe\sparameters\sare\sa\sdifferent\swidth\swhen\slong\sand\sint\sare\sdifferent\s(in\s\n64\sbit\smode).\sEven\sif\sit\shappens\sto\swork\sout,\sit\sshould\sstill\sbe\scased\sexplicitly\sas\s(unsigned\slong)\sjust\sto\sbe\s\ncertain.\sWhen\scompiled\sin\s32\sbit\smode,\sit\swon't\smake\sa\sdifference\s(since\slong\s=\sint)\sbut\sit\swill\smake\scertain\s\nthat\s64\sbit\sdoes\snot\sgo\sbad.\n\nEven\sif\sit\swere\snot\sfatal,\sit\swould\sbe\sbetter\sto\sdo\sit\scorrectly\sas\sthe\sactual\sdata\spassed\sthrough\sgets\s\ncorrupted.\n\n
J login sabbahillel
J mimetype text/plain
J username sabbahillel
K 443938ffffffffffffffffffffffffffffffffff
U sabbahillel
Z 9272ecdcfe47dca37afc06faad6c6ea1