Fossil SCM

More updates f() to f(void).

danield 2023-01-25 13:59 trunk
Commit 46ddf0e80b94f214d3e1da2b01d45f47a9b2f88bb2c3abbdb88383f6cd0797bd
1 file changed +6 -6
+6 -6
--- src/json.c
+++ src/json.c
@@ -1800,11 +1800,11 @@
18001800
18011801
/*
18021802
** Impl of /json/resultCodes
18031803
**
18041804
*/
1805
-cson_value * json_page_resultCodes(){
1805
+cson_value * json_page_resultCodes(void){
18061806
cson_array * list = cson_new_array();
18071807
cson_object * obj = NULL;
18081808
cson_string * kRC;
18091809
cson_string * kSymbol;
18101810
cson_string * kNumber;
@@ -1867,11 +1867,11 @@
18671867
/*
18681868
** /json/version implementation.
18691869
**
18701870
** Returns the payload object (owned by the caller).
18711871
*/
1872
-cson_value * json_page_version(){
1872
+cson_value * json_page_version(void){
18731873
cson_value * jval = NULL;
18741874
cson_object * jobj = NULL;
18751875
jval = cson_value_new_object();
18761876
jobj = cson_value_get_object(jval);
18771877
#define FSET(X,K) cson_object_set( jobj, K, cson_value_new_string(X,strlen(X)))
@@ -1921,11 +1921,11 @@
19211921
** current user (what he may/may not do).
19221922
**
19231923
** This is primarily intended for debuggering, but may have
19241924
** a use in client code. (?)
19251925
*/
1926
-cson_value * json_page_cap(){
1926
+cson_value * json_page_cap(void){
19271927
cson_value * payload = cson_value_new_object();
19281928
cson_value * sub = cson_value_new_object();
19291929
Stmt q;
19301930
cson_object * obj = cson_value_get_object(payload);
19311931
db_prepare(&q, "SELECT login, cap FROM user WHERE uid=%d", g.userUid);
@@ -1988,11 +1988,11 @@
19881988
19891989
/*
19901990
** Implementation of the /json/stat page/command.
19911991
**
19921992
*/
1993
-cson_value * json_page_stat(){
1993
+cson_value * json_page_stat(void){
19941994
i64 t, fsize;
19951995
int n, m;
19961996
int full;
19971997
enum { BufLen = 1000 };
19981998
char zBuf[BufLen];
@@ -2168,11 +2168,11 @@
21682168
21692169
21702170
/*
21712171
** Impl of /json/rebuild. Requires admin privileges.
21722172
*/
2173
-static cson_value * json_page_rebuild(){
2173
+static cson_value * json_page_rebuild(void){
21742174
if( !g.perm.Admin ){
21752175
json_set_err(FSL_JSON_E_DENIED,"Requires 'a' privileges.");
21762176
return NULL;
21772177
}else{
21782178
/* Reminder: the db_xxx() ops "should" fail via the fossil core
@@ -2194,11 +2194,11 @@
21942194
}
21952195
21962196
/*
21972197
** Impl of /json/g. Requires admin/setup rights.
21982198
*/
2199
-static cson_value * json_page_g(){
2199
+static cson_value * json_page_g(void){
22002200
if(!g.perm.Admin || !g.perm.Setup){
22012201
json_set_err(FSL_JSON_E_DENIED,
22022202
"Requires 'a' or 's' privileges.");
22032203
return NULL;
22042204
}
22052205
--- src/json.c
+++ src/json.c
@@ -1800,11 +1800,11 @@
1800
1801 /*
1802 ** Impl of /json/resultCodes
1803 **
1804 */
1805 cson_value * json_page_resultCodes(){
1806 cson_array * list = cson_new_array();
1807 cson_object * obj = NULL;
1808 cson_string * kRC;
1809 cson_string * kSymbol;
1810 cson_string * kNumber;
@@ -1867,11 +1867,11 @@
1867 /*
1868 ** /json/version implementation.
1869 **
1870 ** Returns the payload object (owned by the caller).
1871 */
1872 cson_value * json_page_version(){
1873 cson_value * jval = NULL;
1874 cson_object * jobj = NULL;
1875 jval = cson_value_new_object();
1876 jobj = cson_value_get_object(jval);
1877 #define FSET(X,K) cson_object_set( jobj, K, cson_value_new_string(X,strlen(X)))
@@ -1921,11 +1921,11 @@
1921 ** current user (what he may/may not do).
1922 **
1923 ** This is primarily intended for debuggering, but may have
1924 ** a use in client code. (?)
1925 */
1926 cson_value * json_page_cap(){
1927 cson_value * payload = cson_value_new_object();
1928 cson_value * sub = cson_value_new_object();
1929 Stmt q;
1930 cson_object * obj = cson_value_get_object(payload);
1931 db_prepare(&q, "SELECT login, cap FROM user WHERE uid=%d", g.userUid);
@@ -1988,11 +1988,11 @@
1988
1989 /*
1990 ** Implementation of the /json/stat page/command.
1991 **
1992 */
1993 cson_value * json_page_stat(){
1994 i64 t, fsize;
1995 int n, m;
1996 int full;
1997 enum { BufLen = 1000 };
1998 char zBuf[BufLen];
@@ -2168,11 +2168,11 @@
2168
2169
2170 /*
2171 ** Impl of /json/rebuild. Requires admin privileges.
2172 */
2173 static cson_value * json_page_rebuild(){
2174 if( !g.perm.Admin ){
2175 json_set_err(FSL_JSON_E_DENIED,"Requires 'a' privileges.");
2176 return NULL;
2177 }else{
2178 /* Reminder: the db_xxx() ops "should" fail via the fossil core
@@ -2194,11 +2194,11 @@
2194 }
2195
2196 /*
2197 ** Impl of /json/g. Requires admin/setup rights.
2198 */
2199 static cson_value * json_page_g(){
2200 if(!g.perm.Admin || !g.perm.Setup){
2201 json_set_err(FSL_JSON_E_DENIED,
2202 "Requires 'a' or 's' privileges.");
2203 return NULL;
2204 }
2205
--- src/json.c
+++ src/json.c
@@ -1800,11 +1800,11 @@
1800
1801 /*
1802 ** Impl of /json/resultCodes
1803 **
1804 */
1805 cson_value * json_page_resultCodes(void){
1806 cson_array * list = cson_new_array();
1807 cson_object * obj = NULL;
1808 cson_string * kRC;
1809 cson_string * kSymbol;
1810 cson_string * kNumber;
@@ -1867,11 +1867,11 @@
1867 /*
1868 ** /json/version implementation.
1869 **
1870 ** Returns the payload object (owned by the caller).
1871 */
1872 cson_value * json_page_version(void){
1873 cson_value * jval = NULL;
1874 cson_object * jobj = NULL;
1875 jval = cson_value_new_object();
1876 jobj = cson_value_get_object(jval);
1877 #define FSET(X,K) cson_object_set( jobj, K, cson_value_new_string(X,strlen(X)))
@@ -1921,11 +1921,11 @@
1921 ** current user (what he may/may not do).
1922 **
1923 ** This is primarily intended for debuggering, but may have
1924 ** a use in client code. (?)
1925 */
1926 cson_value * json_page_cap(void){
1927 cson_value * payload = cson_value_new_object();
1928 cson_value * sub = cson_value_new_object();
1929 Stmt q;
1930 cson_object * obj = cson_value_get_object(payload);
1931 db_prepare(&q, "SELECT login, cap FROM user WHERE uid=%d", g.userUid);
@@ -1988,11 +1988,11 @@
1988
1989 /*
1990 ** Implementation of the /json/stat page/command.
1991 **
1992 */
1993 cson_value * json_page_stat(void){
1994 i64 t, fsize;
1995 int n, m;
1996 int full;
1997 enum { BufLen = 1000 };
1998 char zBuf[BufLen];
@@ -2168,11 +2168,11 @@
2168
2169
2170 /*
2171 ** Impl of /json/rebuild. Requires admin privileges.
2172 */
2173 static cson_value * json_page_rebuild(void){
2174 if( !g.perm.Admin ){
2175 json_set_err(FSL_JSON_E_DENIED,"Requires 'a' privileges.");
2176 return NULL;
2177 }else{
2178 /* Reminder: the db_xxx() ops "should" fail via the fossil core
@@ -2194,11 +2194,11 @@
2194 }
2195
2196 /*
2197 ** Impl of /json/g. Requires admin/setup rights.
2198 */
2199 static cson_value * json_page_g(void){
2200 if(!g.perm.Admin || !g.perm.Setup){
2201 json_set_err(FSL_JSON_E_DENIED,
2202 "Requires 'a' or 's' privileges.");
2203 return NULL;
2204 }
2205

Keyboard Shortcuts

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