Got rid of some warnings which appear on some compilers.

git-svn-id: http://picoc.googlecode.com/svn/trunk@557 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2011-02-18 23:05:22 +00:00
parent 57766aa28f
commit ae653d4810

View file

@ -183,16 +183,16 @@ struct Value *VariableDefineButIgnoreIdentical(struct ParseState *Parser, char *
const char *RegisteredMangledName; const char *RegisteredMangledName;
/* make the mangled static name (avoiding using sprintf() to minimise library impact) */ /* make the mangled static name (avoiding using sprintf() to minimise library impact) */
memset(MangledName, '\0', sizeof(MangledName)); memset((void *)&MangledName, '\0', sizeof(MangledName));
*MNPos++ = '/'; *MNPos++ = '/';
strncpy(MNPos, Parser->FileName, MNEnd - MNPos); strncpy(MNPos, (char *)Parser->FileName, MNEnd - MNPos);
MNPos += strlen(MNPos); MNPos += strlen(MNPos);
if (TopStackFrame != NULL) if (TopStackFrame != NULL)
{ {
/* we're inside a function */ /* we're inside a function */
if (MNEnd - MNPos > 0) *MNPos++ = '/'; if (MNEnd - MNPos > 0) *MNPos++ = '/';
strncpy(MNPos, TopStackFrame->FuncName, MNEnd - MNPos); strncpy(MNPos, (char *)TopStackFrame->FuncName, MNEnd - MNPos);
MNPos += strlen(MNPos); MNPos += strlen(MNPos);
} }