* device/lib/Makefile.in: remove abspath for PORTDIR, introduced in
[fw/sdcc] / src / izt / gen.c
index f5b50f5a5eac97c938e774e76bc40944c0914758..6579981f1efe1fa4dd41bb9b6ae45208d8aa693f 100644 (file)
@@ -56,7 +56,7 @@ iemit (const char *szFormat,...)
 
   va_start (ap, szFormat);
 
-  tvsprintf (buffer, szFormat, ap);
+  tvsprintf (buffer, sizeof(buffer), szFormat, ap);
 
   _tidyUp (buffer);
 
@@ -234,7 +234,7 @@ _printLines (void)
 {
   // Currently a holder function.  The Z80 needs some special mangling
   // for bank support.
-  printLine (_G.lines.head, codeOutFile);
+  printLine (_G.lines.head, codeOutBuf);
 }
 
 void
@@ -257,10 +257,12 @@ _emitterCompare (const void *p1, const void *p2)
 static bool
 _tryEmittingiCode (hTab * h, iCode * ic)
 {
-  EMITTER key =
-  {ic->op, NULL};
+  EMITTER key; // = {ic->op, NULL}; Borland C chokes on this; initialize below
   EMITTER *found;
 
+  key.op = ic->op;
+  key.emit = NULL;
+
   found = hTabFindByKey (h, ic->op, &key, _emitterCompare);
 
   if (found)