* src/SDCClrange.c (findPrevUse): fixed bug 1888147
[fw/sdcc] / src / SDCCglue.c
index 30ec7d65c5b25856571f5e3b10f09ea7fe980d0c..c35f114acd24e4477aa54cdc20ebf9e0b8922e91 100644 (file)
@@ -293,7 +293,7 @@ emitRegularMap (memmap * map, bool addPublics, bool arFlag)
 
           if (ival) {
             // set ival's lineno to where the symbol was defined
-            setAstLineno (ival, lineno=sym->lineDef);
+            setAstFileLine (ival, filename = sym->fileDef, lineno = sym->lineDef);
             // check if this is not a constant expression
             if (!constExprTree(ival)) {
               werror (E_CONST_EXPECTED, "found expression");
@@ -1549,30 +1549,6 @@ emitOverlay (struct dbuf_s * aBuf)
     }
 }
 
-
-/*-----------------------------------------------------------------*/
-/* spacesToUnderscores - replace spaces with underscores        */
-/*-----------------------------------------------------------------*/
-static char *
-spacesToUnderscores (char *dest, const char *src, size_t len)
-{
-  unsigned int i;
-  char *p;
-
-  assert(dest != NULL);
-  assert(src != NULL);
-  assert(len > 0);
-
-  --len;
-  for (p = dest, i = 0; *src != '\0' && i < len; ++src, ++i) {
-    *p++ = isspace((unsigned char)*src) ? '_' : *src;
-  }
-  *p = '\0';
-
-  return dest;
-}
-
-
 /*-----------------------------------------------------------------*/
 /* glue - the final glue that hold the whole thing together        */
 /*-----------------------------------------------------------------*/
@@ -1582,7 +1558,6 @@ glue (void)
   struct dbuf_s vBuf;
   struct dbuf_s ovrBuf;
   FILE *asmFile;
-  char moduleBuf[PATH_MAX];
   int mcs51_like;
 
   dbuf_init (&vBuf, 4096);