From e1a0f879f922ce6015fa9f9555525fee3968e187 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 2 Jul 2020 16:52:15 -0600 Subject: * Fix some compilation warnings in Windows. Reported by Barry Landy. --- alpine/xoauth2conf.c | 13 +++---------- imap/src/c-client/auth_bea.c | 3 +-- imap/src/c-client/oauth2_aux.c | 3 +-- pith/pine.hlp | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/alpine/xoauth2conf.c b/alpine/xoauth2conf.c index f21697c..1322777 100644 --- a/alpine/xoauth2conf.c +++ b/alpine/xoauth2conf.c @@ -373,7 +373,7 @@ oauth2_get_client_info(unsigned char *name, char *user) void write_xoauth_configuration(struct variable *v, struct variable **vlist, EditWhich ew) { - int i, j, k, m, n; + int i, k, m, n; XOAUTH2_INFO_S *x = NULL, *y; char ***alval, **lval, **l; char *p; @@ -384,6 +384,7 @@ write_xoauth_configuration(struct variable *v, struct variable **vlist, EditWhi lval = fs_get((n+1)*sizeof(char *)); memset((void *) lval, 0, (n+1)*sizeof(char *)); + m = -1; alval = ALVAL(v, ew); for (i = 0, k = 0; vlist[i] != NULL; i++){ if(x == NULL){ @@ -425,17 +426,9 @@ write_xoauth_configuration(struct variable *v, struct variable **vlist, EditWhi } /* don't let it get to here until we are done! */ lval[k++] = xoauth_config_line(x); - if(alpine_oauth2_list[j].param[OA2_Id].value) - fs_give((void **) &alpine_oauth2_list[j].param[OA2_Id].value); - if(alpine_oauth2_list[j].param[OA2_Secret].value) - fs_give((void **) &alpine_oauth2_list[j].param[OA2_Secret].value); - if(alpine_oauth2_list[j].param[OA2_Tenant].value) - fs_give((void **) &alpine_oauth2_list[j].param[OA2_Tenant].value); - alpine_oauth2_list[j].param[OA2_Id].value = cpystr(x->client_id); - alpine_oauth2_list[j].param[OA2_Secret].value = x->client_secret ? cpystr(x->client_secret) : NULL; - alpine_oauth2_list[j].param[OA2_Tenant].value = x->tenant ? cpystr(x->tenant) : NULL; /* get ready for next run */ free_xoauth2_info(&x); + m = -1; } if(k > 0){ lval[k] = NULL; diff --git a/imap/src/c-client/auth_bea.c b/imap/src/c-client/auth_bea.c index 66604a3..e580042 100644 --- a/imap/src/c-client/auth_bea.c +++ b/imap/src/c-client/auth_bea.c @@ -48,7 +48,6 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder char *service,NETMBX *mb,void *stream, unsigned long port, unsigned long *trial,char *user) { - char *u; void *challenge; unsigned long clen; long ret = NIL; @@ -114,7 +113,7 @@ long auth_oauthbearer_client (authchallenge_t challenger,authrespond_t responder else { char ports[10]; unsigned long rlen; - char *t, *response; + char *response; sprintf(ports, "%lu", port); rlen = strlen(BEARER_ACCOUNT) + strlen(user) + 1 + 1 diff --git a/imap/src/c-client/oauth2_aux.c b/imap/src/c-client/oauth2_aux.c index 88ee52a..e7b14c6 100644 --- a/imap/src/c-client/oauth2_aux.c +++ b/imap/src/c-client/oauth2_aux.c @@ -127,7 +127,7 @@ void mm_login_oauth2_c_client_method (NETMBX *mb, char *user, char *method, OAUTH2_S *oauth2, unsigned long trial, int *tryanother) { - int i, status; + int status; char *s = NULL; JSON_S *json = NULL; @@ -307,7 +307,6 @@ void oauth2deviceinfo_get_accesscode(void *inp, void *outp) OAUTH2_S *oauth2 = oad->xoauth2; OAUTH2_DEVICECODE_S *dcode = &oauth2->devicecode; int done = 0, status, rv; - HTTP_PARAM_S params[OAUTH2_PARAM_NUMBER]; JSON_S *json; if(dcode->device_code && oauth2->param[OA2_DeviceCode].value == NULL) diff --git a/pith/pine.hlp b/pith/pine.hlp index dea70ac..ca46f71 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 476 2020-06-30 21:37:04 +Alpine Commit 477 2020-07-02 16:52:10 ============= h_news ================= -- cgit v1.2.3-54-g00ecf