Fossil SCM

Remove an unused variable from tools/translate.c, which gave the only compiler warning in the build.

dmestas 2026-11-12 04:04 UTC small-fixes
Commit 8ee2a66e73a9aef05e5c02481138f456075410bff61fd5072674a58b5cf56b7a
1 file changed -3
--- tools/translate.c
+++ tools/translate.c
@@ -110,17 +110,15 @@
110110
static void trans(FILE *in, FILE *out){
111111
int i, j, k; /* Loop counters */
112112
char c1, c2; /* Characters used to start a comment */
113113
int lastWasEq = 0; /* True if last non-whitespace character was "=" */
114114
int lastWasComma = 0; /* True if last non-whitespace character was "," */
115
- int lineNo = 0; /* Line number */
116115
char zLine[2000]; /* A single line of input */
117116
char zOut[4000]; /* The input line translated into appropriate output */
118117
119118
c1 = c2 = '-';
120119
while( fgets(zLine, sizeof(zLine), in) ){
121
- lineNo++;
122120
for(i=0; zLine[i] && fossil_isspace(zLine[i]); i++){}
123121
if( zLine[i]!='@' ){
124122
if( inPrint || inStr ) end_block(out);
125123
fprintf(out,"%s",zLine);
126124
/* 0123456789 12345 */
@@ -152,11 +150,10 @@
152150
}
153151
if( zLine[i]=='\\' && (zLine[i+1]==0 || zLine[i+1]=='\r'
154152
|| zLine[i+1]=='\n') ){
155153
zLine[i] = 0;
156154
zNewline = "";
157
- /* fprintf(stderr, "%s:%d: omit newline\n", zInFile, lineNo); */
158155
break;
159156
}
160157
if( zLine[i]=='\\' || zLine[i]=='"' ){ zOut[j++] = '\\'; }
161158
zOut[j++] = zLine[i];
162159
}
163160
--- tools/translate.c
+++ tools/translate.c
@@ -110,17 +110,15 @@
110 static void trans(FILE *in, FILE *out){
111 int i, j, k; /* Loop counters */
112 char c1, c2; /* Characters used to start a comment */
113 int lastWasEq = 0; /* True if last non-whitespace character was "=" */
114 int lastWasComma = 0; /* True if last non-whitespace character was "," */
115 int lineNo = 0; /* Line number */
116 char zLine[2000]; /* A single line of input */
117 char zOut[4000]; /* The input line translated into appropriate output */
118
119 c1 = c2 = '-';
120 while( fgets(zLine, sizeof(zLine), in) ){
121 lineNo++;
122 for(i=0; zLine[i] && fossil_isspace(zLine[i]); i++){}
123 if( zLine[i]!='@' ){
124 if( inPrint || inStr ) end_block(out);
125 fprintf(out,"%s",zLine);
126 /* 0123456789 12345 */
@@ -152,11 +150,10 @@
152 }
153 if( zLine[i]=='\\' && (zLine[i+1]==0 || zLine[i+1]=='\r'
154 || zLine[i+1]=='\n') ){
155 zLine[i] = 0;
156 zNewline = "";
157 /* fprintf(stderr, "%s:%d: omit newline\n", zInFile, lineNo); */
158 break;
159 }
160 if( zLine[i]=='\\' || zLine[i]=='"' ){ zOut[j++] = '\\'; }
161 zOut[j++] = zLine[i];
162 }
163
--- tools/translate.c
+++ tools/translate.c
@@ -110,17 +110,15 @@
110 static void trans(FILE *in, FILE *out){
111 int i, j, k; /* Loop counters */
112 char c1, c2; /* Characters used to start a comment */
113 int lastWasEq = 0; /* True if last non-whitespace character was "=" */
114 int lastWasComma = 0; /* True if last non-whitespace character was "," */
 
115 char zLine[2000]; /* A single line of input */
116 char zOut[4000]; /* The input line translated into appropriate output */
117
118 c1 = c2 = '-';
119 while( fgets(zLine, sizeof(zLine), in) ){
 
120 for(i=0; zLine[i] && fossil_isspace(zLine[i]); i++){}
121 if( zLine[i]!='@' ){
122 if( inPrint || inStr ) end_block(out);
123 fprintf(out,"%s",zLine);
124 /* 0123456789 12345 */
@@ -152,11 +150,10 @@
150 }
151 if( zLine[i]=='\\' && (zLine[i+1]==0 || zLine[i+1]=='\r'
152 || zLine[i+1]=='\n') ){
153 zLine[i] = 0;
154 zNewline = "";
 
155 break;
156 }
157 if( zLine[i]=='\\' || zLine[i]=='"' ){ zOut[j++] = '\\'; }
158 zOut[j++] = zLine[i];
159 }
160

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button