summaryrefslogtreecommitdiff
path: root/www/websh/files/patch-warnings
blob: 8691f5d3c14a6231d80a0cabeacaff3833eb4c5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
Submitted to vendor:

	http://issues.apache.org/bugzilla/show_bug.cgi?id=41523

	-mi

--- ../generic/request_ap.c	2009-05-22 06:13:35.000000000 -0400
+++ ../generic/request_ap.c	2010-02-24 22:24:36.000000000 -0500
@@ -14,4 +14,5 @@
  */
 
+#include <ctype.h>
 #include "tcl.h"
 #include "hashutl.h"
@@ -100,5 +101,4 @@
     if (!remote_user) {
 
-      int ret = 0;
       const char *pw = NULL;
       const char *user = NULL;
--- ../generic/logutl.c	2009-09-14 11:11:40.000000000 -0400
+++ ../generic/logutl.c	2013-05-12 15:04:11.000000000 -0400
@@ -87,5 +87,5 @@
 
     LogLevel *logLevel = NULL;
-    int res;
+    int res = TCL_ERROR;
 
     if ((logData == NULL) || (levelStr == NULL) || (msg == NULL))
@@ -465,7 +465,7 @@
 		case 'p':
 #ifndef WIN32
-		    sprintf(tmpStr, "%d", (int) getpid());
+		    sprintf(tmpStr, "%lu", (unsigned long)getpid());
 #else
-		    sprintf(tmpStr, "%d", (int) _getpid());
+		    sprintf(tmpStr, "%lu", (unsigned long)_getpid());
 #endif
 		    Tcl_AppendToObj(fmsg, tmpStr, -1);
@@ -473,5 +473,5 @@
 		case 't':
 #ifdef TCL_THREADS
-		    sprintf(tmpStr, "%d", (int) Tcl_GetCurrentThread());
+		    sprintf(tmpStr, "%lu", (unsigned long)(uintptr_t)Tcl_GetCurrentThread());
 		    Tcl_AppendToObj(fmsg, tmpStr, -1);
 #else
--- ../generic/nca_d.c	2009-09-14 11:11:40.000000000 -0400
+++ ../generic/nca_d.c	2013-05-12 14:55:21.000000000 -0400
@@ -176,5 +176,4 @@
 
     Tcl_Obj *key = NULL;
-    unsigned char *keyBytes = NULL;
     int keyLen = -1;
     char *str = NULL;
@@ -192,5 +191,5 @@
     WebAssertData(interp, clientData, "web::decryptd", TCL_ERROR);
     key = (Tcl_Obj *) clientData;
-    keyBytes = Tcl_GetByteArrayFromObj(key, &keyLen);
+    Tcl_GetByteArrayFromObj(key, &keyLen);
 
     if (keyLen < 1) {
--- ../generic/formdata.c	2007-09-04 12:59:43.000000000 -0400
+++ ../generic/formdata.c	2013-05-12 14:56:59.000000000 -0400
@@ -273,5 +273,4 @@
     int isLast = TCL_ERROR;
     long upLoadFileSize = 0;
-    long bytesWritten = 0;
     long bytesSkipped = 0;
     Tcl_Obj *tmpFileName = NULL;
@@ -353,5 +352,4 @@
 		}
 
-		bytesWritten = 0;
 		bytesSkipped = 0;
 
@@ -366,8 +364,7 @@
 		}
 
-		bytesWritten =
-		    readAndDumpBody(interp, channel, boundary, &isLast,
-				    tmpFileName, upLoadFileSize,
-				    requestData->filePermissions, &bytesSkipped);
+		readAndDumpBody(interp, channel, boundary, &isLast,
+				tmpFileName, upLoadFileSize,
+				requestData->filePermissions, &bytesSkipped);
 
 		if (fileNameLen > 0) {
--- ../generic/log.c	2009-09-14 11:11:40.000000000 -0400
+++ ../generic/log.c	2013-05-12 14:58:45.000000000 -0400
@@ -35,5 +35,4 @@
     LogPlugIn *logtocmd = NULL;
     LogPlugIn *logtosyslog = NULL;
-    int ires = 0;
 
     /* --------------------------------------------------------------------------
@@ -86,5 +85,5 @@
     logtochannel->handler = logToChannel;
 
-    ires = registerLogPlugIn(interp, "channel", logtochannel);
+    registerLogPlugIn(interp, "channel", logtochannel);
 
     /* --------------------------------------------------------------------------
@@ -98,5 +97,5 @@
     logtofile->handler = logToFile;
 
-    ires = registerLogPlugIn(interp, "file", logtofile);
+    registerLogPlugIn(interp, "file", logtofile);
 
     /* --------------------------------------------------------------------------
@@ -110,5 +109,5 @@
     logtocmd->handler = logToCmd;
 
-    ires = registerLogPlugIn(interp, "command", logtocmd);
+    registerLogPlugIn(interp, "command", logtocmd);
 
     /* --------------------------------------------------------------------------
@@ -123,5 +122,5 @@
     logtosyslog->handler = logToSyslog;
 
-    ires = registerLogPlugIn(interp, "syslog", logtosyslog);
+    registerLogPlugIn(interp, "syslog", logtosyslog);
 #endif
     /* --------------------------------------------------------------------------
Versions 15+ of clang reject K&R-style function-definitions...
--- ../generic/tclAppInit.c	2009-07-14 15:11:04.000000000 -0400
+++ ../generic/tclAppInit.c	2023-02-12 18:07:45.705753000 -0500
@@ -54,7 +54,5 @@
  */
 
-int main(argc, argv)
-     int argc;			/* Number of command-line arguments. */
-     char **argv;		/* Values of command-line arguments. */
+int main(int argc, char **argv)
 {
     /*
--- ../generic/htmlify.c	2009-09-14 11:11:40.000000000 -0400
+++ ../generic/htmlify.c	2023-02-12 18:14:07.883307000 -0500
@@ -128,5 +128,5 @@
 /* <!> */
 /* <-- */
-#define HANDLE_TAG(unic,length,out,pos,err) { \
+#define HANDLE_TAG(unic,length,out,pos) { \
   int open = 1;  /* number of open '<' */ \
   int begin = pos; \
@@ -162,5 +162,5 @@
 }
 
-#define HANDLE_ENTITY(convData, unic, length, out, pos, err) { \
+#define HANDLE_ENTITY(convData, unic, length, out, pos) { \
   int begin = pos; \
   int end = ++pos; \
@@ -202,12 +202,12 @@
     if (unic[first] == '#') { \
       /* a number */ \
-      HANDLE_UNICODE_ENTITY(unic, length, out, begin, first, end, err); \
+      HANDLE_UNICODE_ENTITY(unic, length, out, begin, first, end); \
     } else { \
-      HANDLE_KEY_ENTITY(convData, unic, length, out, begin, first, end, err); \
+      HANDLE_KEY_ENTITY(convData, unic, length, out, begin, first, end); \
     } \
   } \
 }
 
-#define HANDLE_UNICODE_ENTITY(unic, length, out, begin, first, end, err) { \
+#define HANDLE_UNICODE_ENTITY(unic, length, out, begin, first, end) { \
   int tInt = 0; \
   Tcl_UniChar tmp = 0; \
@@ -220,5 +220,4 @@
     /* no valid number, we write the string instead */ \
     Tcl_AppendUnicodeToObj(out,&(unic[begin]),end-begin); \
-    err++; \
   } else { \
     /* check if within range of Tcl_UniChar */ \
@@ -228,5 +227,4 @@
       if (end < length && unic[end] == ';') /* don't forget this one! */ \
 	Tcl_AppendUnicodeToObj(out,&(unic[end]),1); \
-      err++; \
     } else { \
       tmp = (Tcl_UniChar)tInt; \
@@ -237,5 +235,5 @@
 }
 
-#define HANDLE_KEY_ENTITY(convData, unic, length, out, begin, first, end, err) { \
+#define HANDLE_KEY_ENTITY(convData, unic, length, out, begin, first, end) { \
   /* use lookup table */ \
   Tcl_Obj* iObj = NULL; \
@@ -261,5 +259,4 @@
     if (end < length && unic[end] == ';') /* don't forget this one! */ \
       Tcl_AppendUnicodeToObj(out,&(unic[end]),1); \
-    err++; \
   }	 \
 }
@@ -276,5 +273,4 @@
     int plainfirst = 0;
     int plainend = 0;
-    int err = 0;		/* temporary use, may be removed */
 
     if (in == NULL || out == NULL) {
@@ -308,5 +304,5 @@
 	     * we're in a tag, thus we skip everything 
 	     * --------------------------------------------------------------------*/
-	    HANDLE_TAG(unic, length, out, pos, err);
+	    HANDLE_TAG(unic, length, out, pos);
 	    plainfirst = pos + 1;
 
@@ -331,5 +327,5 @@
 	     * it's an entity
 	     */
-	    HANDLE_ENTITY(convData, unic, length, out, pos, err);
+	    HANDLE_ENTITY(convData, unic, length, out, pos);
 	    plainfirst = pos + 1;
 	}