summaryrefslogtreecommitdiff
path: root/compiler_and_linker/FrontEnd/Common
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--compiler_and_linker/FrontEnd/Common/CompilerTools.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/compiler_and_linker/FrontEnd/Common/CompilerTools.c b/compiler_and_linker/FrontEnd/Common/CompilerTools.c
index 272cd81..1a3e995 100644
--- a/compiler_and_linker/FrontEnd/Common/CompilerTools.c
+++ b/compiler_and_linker/FrontEnd/Common/CompilerTools.c
@@ -190,8 +190,8 @@ void AppendGListWord(GList *gl, SInt16 theword) {
ptr = *gl->data + gl->size;
gl->size += 2;
- *(ptr++) = ((unsigned char *) &theword)[0];
- *(ptr++) = ((unsigned char *) &theword)[1];
+ *(ptr++) = ((char *) &theword)[0];
+ *(ptr++) = ((char *) &theword)[1];
}
void AppendGListTargetEndianWord(GList *gl, SInt16 theword) {
@@ -205,8 +205,8 @@ void AppendGListTargetEndianWord(GList *gl, SInt16 theword) {
ptr = *gl->data + gl->size;
gl->size += 2;
theword = CTool_EndianConvertWord16(theword);
- *(ptr++) = ((unsigned char *) &theword)[0];
- *(ptr++) = ((unsigned char *) &theword)[1];
+ *(ptr++) = ((char *) &theword)[0];
+ *(ptr++) = ((char *) &theword)[1];
}
void AppendGListLong(GList *gl, SInt32 theword) {
@@ -219,10 +219,10 @@ void AppendGListLong(GList *gl, SInt32 theword) {
ptr = *gl->data + gl->size;
gl->size += 4;
- *(ptr++) = ((unsigned char *) &theword)[0];
- *(ptr++) = ((unsigned char *) &theword)[1];
- *(ptr++) = ((unsigned char *) &theword)[2];
- *(ptr++) = ((unsigned char *) &theword)[3];
+ *(ptr++) = ((char *) &theword)[0];
+ *(ptr++) = ((char *) &theword)[1];
+ *(ptr++) = ((char *) &theword)[2];
+ *(ptr++) = ((char *) &theword)[3];
}
void AppendGListTargetEndianLong(GList *gl, SInt32 theword) {
@@ -236,10 +236,10 @@ void AppendGListTargetEndianLong(GList *gl, SInt32 theword) {
ptr = *gl->data + gl->size;
gl->size += 4;
theword = CTool_EndianConvertWord32(theword);
- *(ptr++) = ((unsigned char *) &theword)[0];
- *(ptr++) = ((unsigned char *) &theword)[1];
- *(ptr++) = ((unsigned char *) &theword)[2];
- *(ptr++) = ((unsigned char *) &theword)[3];
+ *(ptr++) = ((char *) &theword)[0];
+ *(ptr++) = ((char *) &theword)[1];
+ *(ptr++) = ((char *) &theword)[2];
+ *(ptr++) = ((char *) &theword)[3];
}
void AppendGListID(GList *gl, const char *name) {
@@ -365,7 +365,7 @@ SInt16 CHash(const char *string) {
SInt16 hashval;
UInt8 u;
- if ((hashval = (UInt8) strlen(string))) {
+ if ((hashval = (strlen(string) & 0xFF))) {
i = hashval;
u = 0;
while (i > 0) {