[liblouis-liblouisxml] [liblouis] r1162 committed - Fix a warning

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Tue, 06 May 2014 08:23:55 +0000

Revision: 1162
Author:   mwhapples@xxxxxxxxx
Date:     Tue May  6 08:23:50 2014 UTC
Log:      Fix a warning
http://code.google.com/p/liblouis/source/detail?r=1162

Modified:
 /trunk/liblouis/compileTranslationTable.c

=======================================
--- /trunk/liblouis/compileTranslationTable.c   Tue Apr 29 15:22:19 2014 UTC
+++ /trunk/liblouis/compileTranslationTable.c   Tue May  6 08:23:50 2014 UTC
@@ -5165,7 +5165,13 @@

 static void defaultLogCallback(int level, const char *message)
 {
-  lou_logPrint(message);
+  char *tmpMsg = malloc(strlen(message)+1);
+  if (tmpMsg)
+    {
+      strcpy(tmpMsg, message);
+      lou_logPrint(message);
+      free(tmpMsg);
+    }
 }

 static logcallback logCallbackFunction = defaultLogCallback;
@@ -5208,7 +5214,7 @@
     }
 }

-void logWidecharBuf(int level, const char *msg, widechar *wbuf, int wlen)
+void logWidecharBuf(logLevels level, const char *msg, widechar *wbuf, int wlen)
 {
   /* When calculating output size:
    * Each wdiechar is represented in hex, thus needing two bytes for each
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: