Fossil SCM

Fix harmless compiler warnings.

mistachkin 2018-07-31 00:09 trunk
Commit ea2e51515320126f1cedd52f62eb54cb7276bcb29c7c940bb61d60fd16a733db
2 files changed +1 -1 +31 -29
+1 -1
--- src/email.c
+++ src/email.c
@@ -2112,11 +2112,11 @@
21122112
** A web-form to send an email message to the repository administrator,
21132113
** or (with appropriate permissions) to anybody.
21142114
*/
21152115
void contact_admin_page(void){
21162116
const char *zAdminEmail = db_get("email-admin",0);
2117
- unsigned int uSeed;
2117
+ unsigned int uSeed = 0;
21182118
const char *zDecoded;
21192119
char *zCaptcha = 0;
21202120
21212121
login_check_credentials();
21222122
if( zAdminEmail==0 || zAdminEmail[0]==0 ){
21232123
--- src/email.c
+++ src/email.c
@@ -2112,11 +2112,11 @@
2112 ** A web-form to send an email message to the repository administrator,
2113 ** or (with appropriate permissions) to anybody.
2114 */
2115 void contact_admin_page(void){
2116 const char *zAdminEmail = db_get("email-admin",0);
2117 unsigned int uSeed;
2118 const char *zDecoded;
2119 char *zCaptcha = 0;
2120
2121 login_check_credentials();
2122 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
2123
--- src/email.c
+++ src/email.c
@@ -2112,11 +2112,11 @@
2112 ** A web-form to send an email message to the repository administrator,
2113 ** or (with appropriate permissions) to anybody.
2114 */
2115 void contact_admin_page(void){
2116 const char *zAdminEmail = db_get("email-admin",0);
2117 unsigned int uSeed = 0;
2118 const char *zDecoded;
2119 char *zCaptcha = 0;
2120
2121 login_check_credentials();
2122 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
2123
+31 -29
--- src/main.c
+++ src/main.c
@@ -1838,41 +1838,43 @@
18381838
if( g.fCgiTrace ){
18391839
fossil_trace("######## Calling %s #########\n", pCmd->zName);
18401840
cgi_print_all(1, 1);
18411841
}
18421842
#ifdef FOSSIL_ENABLE_TH1_HOOKS
1843
- /*
1844
- ** The TH1 return codes from the hook will be handled as follows:
1845
- **
1846
- ** TH_OK: The xFunc() and the TH1 notification will both be executed.
1847
- **
1848
- ** TH_ERROR: The xFunc() will be skipped, the TH1 notification will be
1849
- ** skipped. If the xFunc() is being hooked, the error message
1850
- ** will be emitted.
1851
- **
1852
- ** TH_BREAK: The xFunc() and the TH1 notification will both be skipped.
1853
- **
1854
- ** TH_RETURN: The xFunc() will be executed, the TH1 notification will be
1855
- ** skipped.
1856
- **
1857
- ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
1858
- ** executed.
1859
- */
1860
- int rc;
1861
- if( !g.fNoThHook ){
1862
- rc = Th_WebpageHook(pCmd->zName+1, pCmd->eCmdFlags);
1863
- }else{
1864
- rc = TH_OK;
1865
- }
1866
- if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
1867
- if( rc==TH_OK || rc==TH_RETURN ){
1843
+ {
1844
+ /*
1845
+ ** The TH1 return codes from the hook will be handled as follows:
1846
+ **
1847
+ ** TH_OK: The xFunc() and the TH1 notification will both be executed.
1848
+ **
1849
+ ** TH_ERROR: The xFunc() will be skipped, the TH1 notification will be
1850
+ ** skipped. If the xFunc() is being hooked, the error message
1851
+ ** will be emitted.
1852
+ **
1853
+ ** TH_BREAK: The xFunc() and the TH1 notification will both be skipped.
1854
+ **
1855
+ ** TH_RETURN: The xFunc() will be executed, the TH1 notification will be
1856
+ ** skipped.
1857
+ **
1858
+ ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
1859
+ ** executed.
1860
+ */
1861
+ int rc;
1862
+ if( !g.fNoThHook ){
1863
+ rc = Th_WebpageHook(pCmd->zName+1, pCmd->eCmdFlags);
1864
+ }else{
1865
+ rc = TH_OK;
1866
+ }
1867
+ if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
1868
+ if( rc==TH_OK || rc==TH_RETURN ){
18681869
#endif
1869
- pCmd->xFunc();
1870
+ pCmd->xFunc();
18701871
#ifdef FOSSIL_ENABLE_TH1_HOOKS
1871
- }
1872
- if( !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1873
- Th_WebpageNotify(pCmd->zName+1, pCmd->eCmdFlags);
1872
+ }
1873
+ if( !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1874
+ Th_WebpageNotify(pCmd->zName+1, pCmd->eCmdFlags);
1875
+ }
18741876
}
18751877
}
18761878
#endif
18771879
}
18781880
18791881
--- src/main.c
+++ src/main.c
@@ -1838,41 +1838,43 @@
1838 if( g.fCgiTrace ){
1839 fossil_trace("######## Calling %s #########\n", pCmd->zName);
1840 cgi_print_all(1, 1);
1841 }
1842 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1843 /*
1844 ** The TH1 return codes from the hook will be handled as follows:
1845 **
1846 ** TH_OK: The xFunc() and the TH1 notification will both be executed.
1847 **
1848 ** TH_ERROR: The xFunc() will be skipped, the TH1 notification will be
1849 ** skipped. If the xFunc() is being hooked, the error message
1850 ** will be emitted.
1851 **
1852 ** TH_BREAK: The xFunc() and the TH1 notification will both be skipped.
1853 **
1854 ** TH_RETURN: The xFunc() will be executed, the TH1 notification will be
1855 ** skipped.
1856 **
1857 ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
1858 ** executed.
1859 */
1860 int rc;
1861 if( !g.fNoThHook ){
1862 rc = Th_WebpageHook(pCmd->zName+1, pCmd->eCmdFlags);
1863 }else{
1864 rc = TH_OK;
1865 }
1866 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
1867 if( rc==TH_OK || rc==TH_RETURN ){
 
1868 #endif
1869 pCmd->xFunc();
1870 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1871 }
1872 if( !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1873 Th_WebpageNotify(pCmd->zName+1, pCmd->eCmdFlags);
 
1874 }
1875 }
1876 #endif
1877 }
1878
1879
--- src/main.c
+++ src/main.c
@@ -1838,41 +1838,43 @@
1838 if( g.fCgiTrace ){
1839 fossil_trace("######## Calling %s #########\n", pCmd->zName);
1840 cgi_print_all(1, 1);
1841 }
1842 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1843 {
1844 /*
1845 ** The TH1 return codes from the hook will be handled as follows:
1846 **
1847 ** TH_OK: The xFunc() and the TH1 notification will both be executed.
1848 **
1849 ** TH_ERROR: The xFunc() will be skipped, the TH1 notification will be
1850 ** skipped. If the xFunc() is being hooked, the error message
1851 ** will be emitted.
1852 **
1853 ** TH_BREAK: The xFunc() and the TH1 notification will both be skipped.
1854 **
1855 ** TH_RETURN: The xFunc() will be executed, the TH1 notification will be
1856 ** skipped.
1857 **
1858 ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
1859 ** executed.
1860 */
1861 int rc;
1862 if( !g.fNoThHook ){
1863 rc = Th_WebpageHook(pCmd->zName+1, pCmd->eCmdFlags);
1864 }else{
1865 rc = TH_OK;
1866 }
1867 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
1868 if( rc==TH_OK || rc==TH_RETURN ){
1869 #endif
1870 pCmd->xFunc();
1871 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1872 }
1873 if( !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1874 Th_WebpageNotify(pCmd->zName+1, pCmd->eCmdFlags);
1875 }
1876 }
1877 }
1878 #endif
1879 }
1880
1881

Keyboard Shortcuts

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