Fix a potential usage of an un-init variable. (i.e. 'wch')
Up to now, this can NOT happen, because the only caller passes -1 for  'args'.
So axe this useless parameter to avoid troubles.
See PR 60086.
@@ -39,7 +39,7 @@ int APR_DECLARE_DATA apr_app_init_complete = 0;
* _CRT_BLOCK to trick the system into trusting our store.
*/
static int warrsztoastr(const char * const * *retarr,
- const wchar_t * arrsz, int args)
+ const wchar_t * arrsz)
{
const apr_wchar_t *wch;
apr_size_t totlen;
@@ -50,11 +50,9 @@ static int warrsztoastr(const char * const * *retarr,
char *strs;
int arg;
- if (args < 0) {
for (args = 1, wch = arrsz; wch[0] || wch[1]; ++wch)
if (!*wch)
++args;
- }
wsize = 1 + wch - arrsz;
/* This is a safe max allocation, we will alloc each
@@ -134,7 +132,7 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
}
sysstr = GetEnvironmentStringsW();
- dupenv = warrsztoastr(&_environ, sysstr, -1);
+ dupenv = warrsztoastr(&_environ, sysstr);
if (env) {
*env = apr_malloc_dbg((dupenv + 1) * sizeof (char *),
