Fossil SCM

Fix another compiler warning.

mistachkin 2023-05-18 03:31 trunk
Commit 9182b85b49cdb62554952766ad9278511a2a62eb7d0d20b9c7fb6c59dde107fc
1 file changed +5 -3
+5 -3
--- src/checkin.c
+++ src/checkin.c
@@ -1869,10 +1869,12 @@
18691869
int lookFlags; /* output flags from looks_like_utf8/utf16() */
18701870
int fHasAnyCr; /* the blob contains one or more CR chars */
18711871
int fHasLoneCrOnly; /* all detected line endings are CR only */
18721872
int fHasCrLfOnly; /* all detected line endings are CR/LF pairs */
18731873
int fHasInvalidUtf8 = 0;/* contains invalid UTF-8 */
1874
+ int fHasNul; /* contains NUL chars? */
1875
+ int fHasLong; /* overly long line? */
18741876
char *zMsg; /* Warning message */
18751877
Blob fname; /* Relative pathname of the file */
18761878
static int allOk = 0; /* Set to true to disable this routine */
18771879
18781880
if( allOk ) return 0;
@@ -1888,13 +1890,15 @@
18881890
}
18891891
fHasAnyCr = (lookFlags & LOOK_CR);
18901892
fBinary = (lookFlags & LOOK_BINARY);
18911893
fHasLoneCrOnly = ((lookFlags & LOOK_EOL) == LOOK_LONE_CR);
18921894
fHasCrLfOnly = ((lookFlags & LOOK_EOL) == LOOK_CRLF);
1895
+ fHasNul = (lookFlags & LOOK_NUL);
1896
+ fHasLong = (lookFlags & LOOK_LONG);
18931897
}else{
18941898
fUnicode = fHasAnyCr = fBinary = fHasInvalidUtf8 = 0;
1895
- fHasLoneCrOnly = fHasCrLfOnly = 0;
1899
+ fHasLoneCrOnly = fHasCrLfOnly = fHasNul = fHasLong = 0;
18961900
}
18971901
if( !sizeOk || fUnicode || fHasAnyCr || fBinary || fHasInvalidUtf8 ){
18981902
const char *zWarning = 0;
18991903
const char *zDisable = 0;
19001904
const char *zConvert = "c=convert/";
@@ -1901,12 +1905,10 @@
19011905
const char *zIn = "in";
19021906
Blob ans;
19031907
char cReply;
19041908
19051909
if( fBinary ){
1906
- int fHasNul = (lookFlags & LOOK_NUL); /* contains NUL chars? */
1907
- int fHasLong = (lookFlags & LOOK_LONG); /* overly long line? */
19081910
if( binOk ){
19091911
return 0; /* We don't want binary warnings for this file. */
19101912
}
19111913
if( !fHasNul && fHasLong ){
19121914
zWarning = "long lines";
19131915
--- src/checkin.c
+++ src/checkin.c
@@ -1869,10 +1869,12 @@
1869 int lookFlags; /* output flags from looks_like_utf8/utf16() */
1870 int fHasAnyCr; /* the blob contains one or more CR chars */
1871 int fHasLoneCrOnly; /* all detected line endings are CR only */
1872 int fHasCrLfOnly; /* all detected line endings are CR/LF pairs */
1873 int fHasInvalidUtf8 = 0;/* contains invalid UTF-8 */
 
 
1874 char *zMsg; /* Warning message */
1875 Blob fname; /* Relative pathname of the file */
1876 static int allOk = 0; /* Set to true to disable this routine */
1877
1878 if( allOk ) return 0;
@@ -1888,13 +1890,15 @@
1888 }
1889 fHasAnyCr = (lookFlags & LOOK_CR);
1890 fBinary = (lookFlags & LOOK_BINARY);
1891 fHasLoneCrOnly = ((lookFlags & LOOK_EOL) == LOOK_LONE_CR);
1892 fHasCrLfOnly = ((lookFlags & LOOK_EOL) == LOOK_CRLF);
 
 
1893 }else{
1894 fUnicode = fHasAnyCr = fBinary = fHasInvalidUtf8 = 0;
1895 fHasLoneCrOnly = fHasCrLfOnly = 0;
1896 }
1897 if( !sizeOk || fUnicode || fHasAnyCr || fBinary || fHasInvalidUtf8 ){
1898 const char *zWarning = 0;
1899 const char *zDisable = 0;
1900 const char *zConvert = "c=convert/";
@@ -1901,12 +1905,10 @@
1901 const char *zIn = "in";
1902 Blob ans;
1903 char cReply;
1904
1905 if( fBinary ){
1906 int fHasNul = (lookFlags & LOOK_NUL); /* contains NUL chars? */
1907 int fHasLong = (lookFlags & LOOK_LONG); /* overly long line? */
1908 if( binOk ){
1909 return 0; /* We don't want binary warnings for this file. */
1910 }
1911 if( !fHasNul && fHasLong ){
1912 zWarning = "long lines";
1913
--- src/checkin.c
+++ src/checkin.c
@@ -1869,10 +1869,12 @@
1869 int lookFlags; /* output flags from looks_like_utf8/utf16() */
1870 int fHasAnyCr; /* the blob contains one or more CR chars */
1871 int fHasLoneCrOnly; /* all detected line endings are CR only */
1872 int fHasCrLfOnly; /* all detected line endings are CR/LF pairs */
1873 int fHasInvalidUtf8 = 0;/* contains invalid UTF-8 */
1874 int fHasNul; /* contains NUL chars? */
1875 int fHasLong; /* overly long line? */
1876 char *zMsg; /* Warning message */
1877 Blob fname; /* Relative pathname of the file */
1878 static int allOk = 0; /* Set to true to disable this routine */
1879
1880 if( allOk ) return 0;
@@ -1888,13 +1890,15 @@
1890 }
1891 fHasAnyCr = (lookFlags & LOOK_CR);
1892 fBinary = (lookFlags & LOOK_BINARY);
1893 fHasLoneCrOnly = ((lookFlags & LOOK_EOL) == LOOK_LONE_CR);
1894 fHasCrLfOnly = ((lookFlags & LOOK_EOL) == LOOK_CRLF);
1895 fHasNul = (lookFlags & LOOK_NUL);
1896 fHasLong = (lookFlags & LOOK_LONG);
1897 }else{
1898 fUnicode = fHasAnyCr = fBinary = fHasInvalidUtf8 = 0;
1899 fHasLoneCrOnly = fHasCrLfOnly = fHasNul = fHasLong = 0;
1900 }
1901 if( !sizeOk || fUnicode || fHasAnyCr || fBinary || fHasInvalidUtf8 ){
1902 const char *zWarning = 0;
1903 const char *zDisable = 0;
1904 const char *zConvert = "c=convert/";
@@ -1901,12 +1905,10 @@
1905 const char *zIn = "in";
1906 Blob ans;
1907 char cReply;
1908
1909 if( fBinary ){
 
 
1910 if( binOk ){
1911 return 0; /* We don't want binary warnings for this file. */
1912 }
1913 if( !fHasNul && fHasLong ){
1914 zWarning = "long lines";
1915

Keyboard Shortcuts

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