Fossil SCM

Squelch some harmless warnings from an overzealous clang on termux.

danield 2025-12-17 16:06 trunk
Commit 6b2cc46d25b17f862ceec0f93351fb1fb3dd83890d9d855c417269f01104fd7c
2 files changed +1 -1 +2 -2
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -2553,11 +2553,11 @@
25532553
cgi_set_parameter(zHdr, zHdr+n+1);
25542554
zHdr += m+1;
25552555
nHdr -= m+1;
25562556
}
25572557
fossil_free(zToFree);
2558
- fgetc(g.httpIn); /* Read past the "," separating header from content */
2558
+ (void)fgetc(g.httpIn); /* Read past the "," separating header from content */
25592559
cgi_init();
25602560
}
25612561
25622562
#if INTERFACE
25632563
/*
25642564
--- src/cgi.c
+++ src/cgi.c
@@ -2553,11 +2553,11 @@
2553 cgi_set_parameter(zHdr, zHdr+n+1);
2554 zHdr += m+1;
2555 nHdr -= m+1;
2556 }
2557 fossil_free(zToFree);
2558 fgetc(g.httpIn); /* Read past the "," separating header from content */
2559 cgi_init();
2560 }
2561
2562 #if INTERFACE
2563 /*
2564
--- src/cgi.c
+++ src/cgi.c
@@ -2553,11 +2553,11 @@
2553 cgi_set_parameter(zHdr, zHdr+n+1);
2554 zHdr += m+1;
2555 nHdr -= m+1;
2556 }
2557 fossil_free(zToFree);
2558 (void)fgetc(g.httpIn); /* Read past the "," separating header from content */
2559 cgi_init();
2560 }
2561
2562 #if INTERFACE
2563 /*
2564
+2 -2
--- src/main.c
+++ src/main.c
@@ -729,11 +729,11 @@
729729
if( fossil_getenv("FOSSIL_BREAK") ){
730730
if( fossil_isatty(0) && fossil_isatty(2) ){
731731
fprintf(stderr,
732732
"attach debugger to process %d and press any key to continue.\n",
733733
GETPID());
734
- fgetc(stdin);
734
+ (void)fgetc(stdin);
735735
}else{
736736
#if defined(_WIN32) || defined(WIN32)
737737
DebugBreak();
738738
#elif defined(SIGTRAP)
739739
raise(SIGTRAP);
@@ -1688,11 +1688,11 @@
16881688
** iLevel. iLevel is 1 for /login pages and 2 for every other page.
16891689
*/
16901690
int fossil_redirect_to_https_if_needed(int iLevel){
16911691
if( fossil_wants_https(iLevel) ){
16921692
const char *zQS = P("QUERY_STRING");
1693
- char *zURL;
1693
+ char *zURL = 0;
16941694
if( zQS==0 || zQS[0]==0 ){
16951695
zURL = mprintf("%s%T", g.zHttpsURL, P("PATH_INFO"));
16961696
}else if( zQS[0]!=0 ){
16971697
zURL = mprintf("%s%T?%s", g.zHttpsURL, P("PATH_INFO"), zQS);
16981698
}
16991699
--- src/main.c
+++ src/main.c
@@ -729,11 +729,11 @@
729 if( fossil_getenv("FOSSIL_BREAK") ){
730 if( fossil_isatty(0) && fossil_isatty(2) ){
731 fprintf(stderr,
732 "attach debugger to process %d and press any key to continue.\n",
733 GETPID());
734 fgetc(stdin);
735 }else{
736 #if defined(_WIN32) || defined(WIN32)
737 DebugBreak();
738 #elif defined(SIGTRAP)
739 raise(SIGTRAP);
@@ -1688,11 +1688,11 @@
1688 ** iLevel. iLevel is 1 for /login pages and 2 for every other page.
1689 */
1690 int fossil_redirect_to_https_if_needed(int iLevel){
1691 if( fossil_wants_https(iLevel) ){
1692 const char *zQS = P("QUERY_STRING");
1693 char *zURL;
1694 if( zQS==0 || zQS[0]==0 ){
1695 zURL = mprintf("%s%T", g.zHttpsURL, P("PATH_INFO"));
1696 }else if( zQS[0]!=0 ){
1697 zURL = mprintf("%s%T?%s", g.zHttpsURL, P("PATH_INFO"), zQS);
1698 }
1699
--- src/main.c
+++ src/main.c
@@ -729,11 +729,11 @@
729 if( fossil_getenv("FOSSIL_BREAK") ){
730 if( fossil_isatty(0) && fossil_isatty(2) ){
731 fprintf(stderr,
732 "attach debugger to process %d and press any key to continue.\n",
733 GETPID());
734 (void)fgetc(stdin);
735 }else{
736 #if defined(_WIN32) || defined(WIN32)
737 DebugBreak();
738 #elif defined(SIGTRAP)
739 raise(SIGTRAP);
@@ -1688,11 +1688,11 @@
1688 ** iLevel. iLevel is 1 for /login pages and 2 for every other page.
1689 */
1690 int fossil_redirect_to_https_if_needed(int iLevel){
1691 if( fossil_wants_https(iLevel) ){
1692 const char *zQS = P("QUERY_STRING");
1693 char *zURL = 0;
1694 if( zQS==0 || zQS[0]==0 ){
1695 zURL = mprintf("%s%T", g.zHttpsURL, P("PATH_INFO"));
1696 }else if( zQS[0]!=0 ){
1697 zURL = mprintf("%s%T?%s", g.zHttpsURL, P("PATH_INFO"), zQS);
1698 }
1699

Keyboard Shortcuts

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