Browse Source

Fix pointer sign warnings.

git-svn-id: file:///var/svn/tigccpp/trunk/tigcc/ld-tigcc@1125 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 17 years ago
parent
commit
d080af18ad
6 changed files with 17 additions and 16 deletions
  1. 2 2
      ar/import/imp_amig.c
  2. 1 1
      generic.h
  3. 5 5
      import/imp_amig.c
  4. 3 3
      insert/comprrlc.c
  5. 3 3
      insert/kernel.c
  6. 3 2
      insert/other.c

+ 2 - 2
ar/import/imp_amig.c

@@ -1,6 +1,6 @@
 /* imp_amiga.c: Routines to import an AmigaOS-hunks file
 
-   Copyright (C) 2003-2005 Kevin Kofler
+   Copyright (C) 2003-2007 Kevin Kofler
    Copyright (C) 2003 Sebastian Reichelt
 
    This program is free software; you can redistribute it and/or modify
@@ -111,7 +111,7 @@ BOOLEAN ArImportAmigaOSFile (OBJECT_FILE *ObjectFile)
 					
 					{
 						char symName[hunkSize+1];
-						strncpy(symName,ptr,hunkSize);
+						strncpy(symName,(const char *)ptr,hunkSize);
 						symName[hunkSize] = 0;
 						ptr += hunkSize;
 

+ 1 - 1
generic.h

@@ -67,7 +67,7 @@ TIOS_UPGRADE_FILE_SUPPORT
 
 // This defines the current version of ld-tigcc and ar-tigcc.
 #define PROGRAM_VERSION_STRING "1.07"
-#define COPYRIGHT_NOTICE_STRING "Copyright (C) 2002-2006 Sebastian Reichelt, Kevin Kofler and Billy Charvet"
+#define COPYRIGHT_NOTICE_STRING "Copyright (C) 2002-2007 Sebastian Reichelt, Kevin Kofler and Billy Charvet"
 
 // Handling of user-defined functionality dependencies.
 #ifdef TARGET_DLL

+ 5 - 5
import/imp_amig.c

@@ -1,6 +1,6 @@
 /* imp_amig.c: Routines to import an AmigaOS-hunks file
 
-   Copyright (C) 2002-2005 Kevin Kofler
+   Copyright (C) 2002-2007 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -112,7 +112,7 @@ BOOLEAN ImportAmigaOSFile (PROGRAM *Program, const I1 *File, SIZE FileSize, cons
 				TestInFile(ptr,I1[hunkSize]);
 				hunkName = malloc(hunkSize+1);
 				TestMem(hunkName);
-				strncpy(hunkName,ptr,hunkSize);
+				strncpy(hunkName,(const char *)ptr,hunkSize);
 				hunkName[hunkSize]=0;
 				ptr += hunkSize;
 				break;
@@ -505,7 +505,7 @@ BOOLEAN ImportAmigaOSFile (PROGRAM *Program, const I1 *File, SIZE FileSize, cons
 					TestInFile(ptr,I1[hunkSize]);
 					symName = malloc(hunkSize+1);
 					TestMem(symName);
-					strncpy(symName,ptr,hunkSize);
+					strncpy(symName,(const char *)ptr,hunkSize);
 					symName[hunkSize]=0;
 					ptr+=hunkSize;
 
@@ -648,7 +648,7 @@ BOOLEAN ImportAmigaOSFile (PROGRAM *Program, const I1 *File, SIZE FileSize, cons
 					symSize = (hunkSize<MAX_SYM_LEN)?hunkSize:MAX_SYM_LEN;
 
 					for_each(symbol,currSection->Symbols) {
-						if (!strncmp(symbol->Name,ptr,symSize) && !(ptr[symSize])) {
+						if (!strncmp(symbol->Name,(const char *)ptr,symSize) && !(ptr[symSize])) {
 							found = TRUE;
 							break;
 						}
@@ -665,7 +665,7 @@ BOOLEAN ImportAmigaOSFile (PROGRAM *Program, const I1 *File, SIZE FileSize, cons
 						currSymbol = calloc (1, sizeof (SYMBOL));
 						TestMem(currSymbol);
 						currSymbol->Parent = currSection;
-						strncpy(currSymbol->Name,ptr,symSize);
+						strncpy(currSymbol->Name,(const char *)ptr,symSize);
 						currSymbol->Name[symSize+1]=0;
 						ptr+=hunkSize;
 						// Do NOT handle special symbols specially here! Those symbols are

+ 3 - 3
insert/comprrlc.c

@@ -1,6 +1,6 @@
 /* comprrlc.c: Routines for compressed relocation tables
 
-   Copyright (C) 2003-2005 Kevin Kofler
+   Copyright (C) 2003-2007 Kevin Kofler
    Portions copyright (C) 2002-2003 Sebastian Reichelt
 
    This program is free software; you can redistribute it and/or modify
@@ -636,7 +636,7 @@ BOOLEAN InsertPreOsLibraries (SECTION *Section, SECTION *MergedSection, const LO
 							// Output its name.
 							if (strlen (CurLib->Lib->Name) > 8)
 								Warning (Section->FileName, "Library name `%s' too long; cutting off at 8th character.", CurLib->Lib->Name);
-							strncpy (NewData, CurLib->Lib->Name, 8);
+							strncpy ((char *)NewData, CurLib->Lib->Name, 8);
 							WriteTI1 (*((TI1 *) (NewData + 9)), CurLib->Lib->Version);
 							NewData += 10;
 						}
@@ -868,7 +868,7 @@ BOOLEAN InsertFargo021Libraries (SECTION *Section, SECTION *MergedSection, const
 							if (CurLib->FunctionCount)
 							{
 								// Output its name.
-								strcpy (LibName, CurLib->Lib->Name);
+								strcpy ((char *)LibName, CurLib->Lib->Name);
 								LibName += strlen (CurLib->Lib->Name) + 1;
 							}
 						}

+ 3 - 3
insert/kernel.c

@@ -1,7 +1,7 @@
 /* kernel.c: Routines to handle automatic insertion of section contents in kernel format
 
    Copyright (C) 2003 Sebastian Reichelt
-   Copyright (C) 2003-2005 Kevin Kofler
+   Copyright (C) 2003-2007 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -329,7 +329,7 @@ BOOLEAN InsertKernelLibraries (SECTION *Section)
 							// Output its name.
 							if (strlen (CurLib->Lib->Name) > 8)
 								Warning (Section->FileName, "Library name `%s' too long; cutting off at 8th character.", CurLib->Lib->Name);
-							strncpy (NewData, CurLib->Lib->Name, 8);
+							strncpy ((char *)NewData, CurLib->Lib->Name, 8);
 							WriteTI1 (*((TI1 *) (NewData + 9)), CurLib->Lib->Version);
 							NewData += 10;
 						}
@@ -432,7 +432,7 @@ BOOLEAN InsertFargo020Libraries (SECTION *Section)
 							if (CurLib->FunctionCount)
 							{
 								// Output its name.
-								strcpy (LibName, CurLib->Lib->Name);
+								strcpy ((char *)LibName, CurLib->Lib->Name);
 								// Create a new reloc at the current location, pointing to
 								// the location of the library name.
 								{

+ 3 - 2
insert/other.c

@@ -1,6 +1,7 @@
 /* other.c: Routines to handle automatic insertion of section contents
 
-   Copyright (C) 2003 Sebastian Reichelt, Kevin Kofler
+   Copyright (C) 2003 Sebastian Reichelt
+   Copyright (C) 2003-2007 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -136,7 +137,7 @@ BOOLEAN InsertDataVarName (SECTION *Section)
 		
 		// Copy the string into the allocated space.
 		if (NewData)
-			strcpy (NewData, Program->DataVarInfo->Name);
+			strcpy ((char *)NewData, Program->DataVarInfo->Name);
 		else
 			return FALSE;
 	}