texlive[45161] Build/source/texk/makejvf: texk/makejvf: Suppress

commits+takuji at tug.org commits+takuji at tug.org
Tue Aug 29 15:19:58 CEST 2017


Revision: 45161
          http://tug.org/svn/texlive?view=revision&revision=45161
Author:   takuji
Date:     2017-08-29 15:19:57 +0200 (Tue, 29 Aug 2017)
Log Message:
-----------
texk/makejvf: Suppress compiler warnings

Modified Paths:
--------------
    trunk/Build/source/texk/makejvf/uniblock.c
    trunk/Build/source/texk/makejvf/usrtable.c

Modified: trunk/Build/source/texk/makejvf/uniblock.c
===================================================================
--- trunk/Build/source/texk/makejvf/uniblock.c	2017-08-29 12:03:33 UTC (rev 45160)
+++ trunk/Build/source/texk/makejvf/uniblock.c	2017-08-29 13:19:57 UTC (rev 45161)
@@ -344,7 +344,7 @@
   usertable_charset[1].max=0xFFFB;
 
   for (ch=0x0;ch<0x10000;ch++) {
-    printf(" %05x %1d G:%2d C:%2d J:%2d K:%2d custom:%2d\n", ch, uniblock_iskanji,
+    printf(" %05lx %1d G:%2d C:%2d J:%2d K:%2d custom:%2d\n", ch, uniblock_iskanji,
 	   search_cjk_entry(ch,ENTRY_G),
 	   search_cjk_entry(ch,ENTRY_C),
 	   search_cjk_entry(ch,ENTRY_J),
@@ -351,6 +351,6 @@
 	   search_cjk_entry(ch,ENTRY_K),
 	   search_cjk_entry(ch,ENTRY_CUSTOM));
   }
-
+  return(0);
 }
 #endif

Modified: trunk/Build/source/texk/makejvf/usrtable.c
===================================================================
--- trunk/Build/source/texk/makejvf/usrtable.c	2017-08-29 12:03:33 UTC (rev 45160)
+++ trunk/Build/source/texk/makejvf/usrtable.c	2017-08-29 13:19:57 UTC (rev 45161)
@@ -29,8 +29,8 @@
 		exit(1);
 	}
 	for (l = 0; fgets(buf, BUF_SIZE, fp) != NULL; l++) {
-		if (endptr=strchr(buf, '%')) strcpy(endptr,"\n");  /* ignore after '%'  */
-		if (!strncmp(buf, "\n", 1)) continue;              /* ignore empty line */
+		if ((endptr=strchr(buf, '%')) != NULL) strcpy(endptr,"\n");  /* ignore after '%'  */
+		if (!strncmp(buf, "\n", 1)) continue;                        /* ignore empty line */
 		tok = strtok(buf, "\t");
 		if (!strcmp(tok, "REPLACE")) {
 			if (usertable_replace_max >= MAX_TABLE) goto buferr;
@@ -56,8 +56,8 @@
 		}
 		if ((!strcmp(tok, "+") && charset_mode) || !strcmp(tok, "CHARSET")) {
 			charset_mode = 1;
-			while (tok=strtok(NULL, ",\t\n")) {
-				if (endptr=strstr(tok,"..")) {
+			while ((tok=strtok(NULL, ",\t\n")) != NULL) {
+				if ((endptr=strstr(tok,"..")) != NULL) {
 					*endptr = '\0';
 					if (sscanf(tok,     "%7s",str0) != 1) goto taberr;
 					if (sscanf(endptr+2,"%7s",str1) != 1) goto taberr;
@@ -102,7 +102,6 @@
 #ifdef DEBUG
 int main() {
   int i;
-  long ch0,ch1;
   char name[]="test_user_table";
   get_usertable(name);
 
@@ -119,7 +118,8 @@
   if (usertable_charset_max>0) {
     printf("CHARSET::\n");
     for(i=0;i<usertable_charset_max;i++)
-      printf("%6d:  %06x .. %06x\n", i, usertable_charset[i].min, usertable_charset[i].max);
+      printf("%6d:  %06lx .. %06lx\n", i, usertable_charset[i].min, usertable_charset[i].max);
   }
+  return(0);
 }
 #endif



More information about the tex-live-commits mailing list