Warning when libfile not found and path is null
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 28 Jul 2003 23:19:22 +0000 (23:19 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 28 Jul 2003 23:19:22 +0000 (23:19 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2783 4a8a32a2-be11-0410-ad9d-d568d2c75423

as/mcs51/lklibr.c
link/z80/lklibr.c

index e880d7a6e23e164dbbdb7f74a902fef80ab16d0a..d7d9cb249049701b180007462fd179ccc4d31712 100644 (file)
@@ -126,13 +126,17 @@ addlib()
 
        unget(getnb());
 
-       if (lbphead == NULL) {
-               addfile(NULL,ip);
-               return;
-       }       
-       for (lbph=lbphead; lbph; lbph=lbph->next) {
-               foundcount+=addfile(lbph->path,ip);
+       if (lbphead == NULL)
+    {
+               foundcount+=addfile(NULL,ip);
        }
+    else
+    {
+           for (lbph=lbphead; lbph; lbph=lbph->next)
+        {
+                   foundcount+=addfile(lbph->path,ip);
+           }
+    }
     if(foundcount==0)
     {
         printf("?ASlink-Warning-Couldn't find library '%s'\n", ip);
index 94b54da551ddc6a8508b7f3b529d6c1ba30c8e09..eb4cd98da98e8cfee0cee2d915a385b89d520dd2 100644 (file)
@@ -175,16 +175,20 @@ addlib()
 
        unget(getnb());
 
-       if (lbphead == NULL) {
-               addfile(NULL,ip);
-               return;
-       }       
-       for (lbph=lbphead; lbph; lbph=lbph->next) {
-               foundcount+=addfile(lbph->path,ip);
+       if (lbphead == NULL)
+    {
+               foundcount+=addfile(NULL, ip);
        }
+    else
+    {
+           for (lbph=lbphead; lbph; lbph=lbph->next)
+        {
+                   foundcount+=addfile(lbph->path,ip);
+           }
+    }
     if(foundcount==0)
     {
-        printf("?ASlink-Warning-Couldn't find library '%s'\n", ip);
+        printf("\n?ASlink-Warning-Couldn't find library '%s'", ip);
     }
 }