Fixed some gcc warnings
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 16 Jul 2003 16:16:16 +0000 (16:16 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 16 Jul 2003 16:16:16 +0000 (16:16 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2740 4a8a32a2-be11-0410-ad9d-d568d2c75423

as/mcs51/lklibr.c

index c4006102e95d87e374ee9164cc8a6b204ae6f61e..d0d6c23e124a2939a62f9901c06cc09800c426a5 100644 (file)
@@ -25,6 +25,7 @@
 #include <malloc.h>
 #endif
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include "aslink.h"
 
@@ -359,11 +360,10 @@ embedded in the library file.*/
 int SdccLib(char * PathLib, FILE * libfp, char * DirLib, char * SymName)
 {
        struct lbfile *lbfh, *lbf;
-       char name[NCPS]="";
        char ModName[NCPS]="";
        char FLine[MAXLINE+1];
        int state=0;
-       long IndexOffset, FileOffset;
+       long IndexOffset=0, FileOffset;
 
        while(!feof(libfp))
     {