summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-04-08 08:53:12 -0600
committerEduardo Chappa <chappa@washington.edu>2021-04-08 08:53:12 -0600
commit7ca059d80aae996ff3031aca15241a55e255a0f5 (patch)
tree5b7ca64156469d2ba4f89d1de00871d75ca4626f
parent4f13a7bcddc60430203fd545a3c584b3e9fc27aa (diff)
downloadalpine-7ca059d80aae996ff3031aca15241a55e255a0f5.tar.xz
* Clear out some warnings given by gcc 10.
-rw-r--r--alpine/arg.c2
-rw-r--r--alpine/imap.c109
-rw-r--r--alpine/imap.h2
-rw-r--r--alpine/osdep/debuging.c2
-rw-r--r--alpine/reply.c8
-rw-r--r--alpine/smime.c5
-rw-r--r--alpine/xoauth2.h8
-rw-r--r--alpine/xoauth2conf.c74
-rw-r--r--pico/display.c11
-rw-r--r--pico/main.c3
-rw-r--r--pico/search.c2
-rw-r--r--pith/ical.c8
-rw-r--r--pith/mailview.c6
-rw-r--r--pith/save.c6
-rw-r--r--pith/smime.c2
-rw-r--r--pith/smkeys.c3
16 files changed, 116 insertions, 135 deletions
diff --git a/alpine/arg.c b/alpine/arg.c
index 72ab064a..a5e54d80 100644
--- a/alpine/arg.c
+++ b/alpine/arg.c
@@ -622,7 +622,7 @@ Loop: while(--ac > 0)
if((str = *++av) != NULL){
if(x.name)
fs_give((void **) &x.name);
- x.name = cpystr(str);
+ x.name = (unsigned char *) cpystr(str);
}
}
else{
diff --git a/alpine/imap.c b/alpine/imap.c
index 6e6ea8cb..85c25029 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -1,7 +1,3 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: imap.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2013-2020 Eduardo Chappa
@@ -145,8 +141,7 @@ extern XOAUTH2_INFO_S xoauth_default[];
* c-client for processing. Every c-client application must have its
* own.
*/
-OAUTH2_S alpine_oauth2_list[] =
-{
+OAUTH2_S alpine_oauth2_list[] = {
{GMAIL_NAME,
{"imap.gmail.com", "smtp.gmail.com", NULL, NULL},
{{"client_id", NULL},
@@ -162,12 +157,12 @@ OAUTH2_S alpine_oauth2_list[] =
{"state", NULL},
{"device_code", NULL} /* not used */
},
- {{"GET", "https://accounts.google.com/o/oauth2/auth", /* authorization address, get access code */
+ {{"GET", (unsigned char *) "https://accounts.google.com/o/oauth2/auth", /* authorization address, get access code */
{OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_End, OA2_End, OA2_End}},
{NULL, NULL, {OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}}, /* Device Info information, not used */
- {"POST", "https://accounts.google.com/o/oauth2/token", /* Address to get refresh token from access code */
+ {"POST", (unsigned char *) "https://accounts.google.com/o/oauth2/token", /* Address to get refresh token from access code */
{OA2_Id, OA2_Secret, OA2_Redirect, OA2_GrantTypeforAccessToken, OA2_Code, OA2_End, OA2_End}},
- {"POST", "https://accounts.google.com/o/oauth2/token", /* access token from refresh token */
+ {"POST", (unsigned char *) "https://accounts.google.com/o/oauth2/token", /* access token from refresh token */
{OA2_Id, OA2_Secret, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_End, OA2_End, OA2_End}}
},
{NULL, NULL, NULL, 0, 0, NULL}, /* device_code information */
@@ -196,11 +191,11 @@ OAUTH2_S alpine_oauth2_list[] =
{"device_code", NULL} /* only used for frst time set up */
},
{{NULL, NULL, {OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}}, /* Get Access Code, Not used */
- {"POST", "https://login.microsoftonline.com/\001/oauth2/v2.0/devicecode", /* first time use and get device code information */
+ {"POST", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/devicecode", /* first time use and get device code information */
{OA2_Id, OA2_Scope, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}},
- {"POST", "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get first Refresh Token and Access token */
+ {"POST", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get first Refresh Token and Access token */
{OA2_Id, OA2_Redirect, OA2_DeviceCode, OA2_End, OA2_End, OA2_End, OA2_End}},
- {"POST", "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get access token from refresh token */
+ {"POST", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get access token from refresh token */
{OA2_Id, OA2_RefreshToken, OA2_Scope, OA2_GrantTypefromRefreshToken, OA2_End, OA2_End, OA2_End}}
},
{NULL, NULL, NULL, 0, 0, NULL}, /* device_code information */
@@ -228,12 +223,12 @@ OAUTH2_S alpine_oauth2_list[] =
{"state", NULL}, /* not used */
{"device_code", NULL} /* not used */
},
- {{"GET", "https://login.microsoftonline.com/\001/oauth2/v2.0/authorize", /* Get Access Code */
+ {{"GET", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/authorize", /* Get Access Code */
{OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_End, OA2_End, OA2_End}},
{NULL, NULL, {OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}}, /* device code, not used */
- {"POST", "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get first Refresh Token and Access token */
+ {"POST", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get first Refresh Token and Access token */
{OA2_Id, OA2_Redirect, OA2_Scope, OA2_GrantTypeforAccessToken, OA2_Secret, OA2_Code, OA2_End}},
- {"POST", "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get access token from refresh token */
+ {"POST", (unsigned char *) "https://login.microsoftonline.com/\001/oauth2/v2.0/token", /* Get access token from refresh token */
{OA2_Id, OA2_RefreshToken, OA2_Scope, OA2_GrantTypefromRefreshToken, OA2_Secret, OA2_End, OA2_End}}
},
{NULL, NULL, NULL, 0, 0, NULL}, /* device_code information, not used */
@@ -261,12 +256,12 @@ OAUTH2_S alpine_oauth2_list[] =
{"state", NULL}, /* used */
{"device_code", NULL} /* not used */
},
- {{"GET", "https://api.login.yahoo.com/oauth2/request_auth", /* Get Access Code */
+ {{"GET", (unsigned char *) "https://api.login.yahoo.com/oauth2/request_auth", /* Get Access Code */
{OA2_Id, OA2_Redirect, OA2_Response, OA2_State, OA2_End, OA2_End, OA2_End}},
{NULL, NULL, {OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}}, /* device code, not used */
- {"POST", "https://api.login.yahoo.com/oauth2/get_token", /* Get first Refresh Token and Access token */
+ {"POST", (unsigned char *) "https://api.login.yahoo.com/oauth2/get_token", /* Get first Refresh Token and Access token */
{OA2_Id, OA2_Secret, OA2_Redirect, OA2_Code, OA2_GrantTypeforAccessToken, OA2_End, OA2_End}},
- {"POST", "https://api.login.yahoo.com/oauth2/get_token", /* Get access token from refresh token */
+ {"POST", (unsigned char *) "https://api.login.yahoo.com/oauth2/get_token", /* Get access token from refresh token */
{OA2_Id, OA2_Secret, OA2_Redirect, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_End, OA2_End}}
},
{NULL, NULL, NULL, 0, 0, NULL}, /* device_code information, not used */
@@ -294,12 +289,12 @@ OAUTH2_S alpine_oauth2_list[] =
{"state", NULL}, /* not used */
{"device_code", NULL} /* not used */
},
- {{"GET", "https://oauth.yandex.com/authorize", /* Get Access Code */
+ {{"GET", (unsigned char *) "https://oauth.yandex.com/authorize", /* Get Access Code */
{OA2_Id, OA2_Redirect, OA2_Response, OA2_End, OA2_End, OA2_End, OA2_End}},
{NULL, NULL, {OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End, OA2_End}}, /* device code, not used */
- {"POST", "https://oauth.yandex.com/token", /* Get first Refresh Token and Access token */
+ {"POST", (unsigned char *) "https://oauth.yandex.com/token", /* Get first Refresh Token and Access token */
{OA2_Id, OA2_Redirect, OA2_GrantTypeforAccessToken, OA2_Secret, OA2_Code, OA2_End, OA2_End}},
- {"POST", "https://oauth.yandex.com/token", /* Get access token from refresh token */
+ {"POST", (unsigned char *) "https://oauth.yandex.com/token", /* Get access token from refresh token */
{OA2_Id, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_Secret, OA2_End, OA2_End, OA2_End}}
},
{NULL, NULL, NULL, 0, 0, NULL}, /* device_code information, not used */
@@ -312,7 +307,36 @@ OAUTH2_S alpine_oauth2_list[] =
0, /* Cancel refresh token */
YANDEX_FLAGS /* default flags. For YANDEX this should be set to OA2_AUTHORIZE */
},
- { NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0},
+ {NULL, /* Name, unsigned char * */
+ {NULL, NULL, NULL, NULL }, /* host and equivalents */
+ {{NULL, NULL}, /* client-id */
+ {NULL, NULL}, /* client-secret */
+ {NULL, NULL}, /* tenant - outlook */
+ {NULL, NULL}, /* access_code, for authorize method */
+ {NULL, NULL}, /* refresh token */
+ {NULL, NULL}, /* scope */
+ {NULL, NULL}, /* redirect */
+ {NULL, NULL}, /* grant type for access token */
+ {NULL, NULL}, /* grant type from refresh token */
+ {NULL, NULL}, /* response */
+ {NULL, NULL}, /* state */
+ {NULL, NULL} /* device code */
+ },
+ {{NULL, NULL, {0, 0, 0, 0, 0, 0, 0}}, /* method, server, parameters for authorize */
+ {NULL, NULL, {0, 0, 0, 0, 0, 0, 0}}, /* method, server, parameters for device login */
+ {NULL, NULL, {0, 0, 0, 0, 0, 0, 0}}, /* method, server, parameters for getting refresh token */
+ {NULL, NULL, {0, 0, 0, 0, 0, 0, 0}} /* method, server, parameters for refreshing access token */
+ },
+ {NULL, NULL, NULL, 0, 0, NULL}, /* device_code information */
+ NULL, /* access token */
+ NULL, /* special IMAP ID */
+ 0, /* Hide this */
+ 0, /* expiration time */
+ 0, /* first time */
+ 0, /* require secret */
+ 0, /* cancel refresh token */
+ 0 /* flags */
+ }
};
int
@@ -404,15 +428,15 @@ oauth2_select_flow(char *host)
int sel, n = 0, j;
for(oa2list = alpine_oauth2_list; oa2list && oa2list->name ;oa2list++)
- n += strlen(oa2list->name); + 5; /* number, parenthesis, space */
- n += 1024; /* large enough to display to lines of 80 characters in UTF-8 */
+ n += strlen((char *) oa2list->name) + 5; /* number, parenthesis, space */
+ n += 1024; /* large enough to display lines of 80 characters in UTF-8 */
s = fs_get(n*sizeof(char));
strcpy(s, _("Please select below the authorization flow you would like to follow:"));
sprintf(s + strlen(s), _("Please select the client-id to use from the following list.\n\n"));
for(j = 1, oa2list = alpine_oauth2_list; oa2list && oa2list->name ;oa2list++){
for(i = 0; oa2list && oa2list->host && oa2list->host[i] && strucmp(oa2list->host[i], host); i++);
- if(oa2list && oa2list->host && i < OAUTH2_TOT_EQUIV && oa2list->host[i])
- sprintf(s + strlen(s), " %d) %.70s\n", j++, oa2list->name);
+ if(oa2list && oa2list->host && i < OAUTH2_TOT_EQUIV && oa2list->host[i])
+ sprintf(s + strlen(s), " %d) %.70s\n", j++, oa2list->name);
}
display_init_err(s, 0);
@@ -472,8 +496,7 @@ void
oauth2_set_device_info(OAUTH2_S *oa2, char *method)
{
char tmp[MAILTMPLEN];
- char *code;
- char *name = oa2->name;
+ char *name = (char *) oa2->name;
int aux_rv_value;
OAUTH2_DEVICECODE_S *deviceinfo = &oa2->devicecode;
OAUTH2_DEVICEPROC_S aux_value;
@@ -508,7 +531,7 @@ oauth2_set_device_info(OAUTH2_S *oa2, char *method)
}
else{
so_puts(in_store, "</P><P>");
- so_puts(in_store, deviceinfo->message);
+ so_puts(in_store, (char *) deviceinfo->message);
}
so_puts(in_store, _("</P><P> Alpine will try to use your URL Viewers setting to find a browser to open this URL."));
sprintf(tmp, _(" When you open this link, you will be sent to %s's servers to complete this process."), name);
@@ -569,9 +592,6 @@ oauth2_set_device_info(OAUTH2_S *oa2, char *method)
oauth2_elapsed_done(NULL);
}
else{
- int flags, rc, q_line;
- /* TRANSLATORS: user needs to input an access code from the server */
- char prompt[MAILTMPLEN], token[MAILTMPLEN];
/*
* If screen hasn't been initialized yet, use want_to.
*/
@@ -630,8 +650,6 @@ try_wantto:
if(want_to(tmp, 'n', 'x', NO_HELP, WT_NORM) == 'y'){
int rv;
UCS ch;
- q_line = -(ps_global->ttyo ? ps_global->ttyo->footer_rows : 3);
- flags = OE_APPEND_CURRENT;
snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf),
"%s", _("After you are done going through the process described above, press \'y\' to continue, or \'n\' to cancel\n"));
@@ -677,7 +695,7 @@ oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, int *
sprintf(tmp, _("<P>Alpine is attempting to log you into your %s account, using the %s method."), oauth2->name, method),
so_puts(in_store, tmp);
- if(strucmp(oauth2->name, GMAIL_NAME) == 0){
+ if(strucmp((char *) oauth2->name, (char *) GMAIL_NAME) == 0){
so_puts(in_store, _(" If this is your first time setting up this type of authentication, please follow the steps below. "));
so_puts(in_store, _("</P><P> First you must register Alpine with Google and create a client-id and client-secret. If you already did that, then you can skip to the authorization step, and continue with the process outlined below."));
so_puts(in_store, _("<UL> "));
@@ -895,12 +913,7 @@ mm_login_oauth2(NETMBX *mb, char *user, char *method,
char *usethisprompt, char *altuserforcache)
{
char *token, tmp[MAILTMPLEN];
- char prompt[4*MAILTMPLEN], value[4*MAILTMPLEN], *last;
- char defuser[NETMAXUSER];
- char hostleadin[80], hostname[200], defubuf[200];
- char logleadin[80], pwleadin[50];
- char *url_oauth2;
- char *tool = NULL;
+ char prompt[4*MAILTMPLEN];
char *OldRefreshToken, *OldAccessToken;
char *NewRefreshToken, *NewAccessToken;
char *SaveRefreshToken, *SaveAccessToken;
@@ -910,9 +923,7 @@ mm_login_oauth2(NETMBX *mb, char *user, char *method,
login name), this is just labelling that user name. */
char *userlabel = _("USER");
STRLIST_S hostlist[2], hostlist2[OAUTH2_TOT_EQUIV+1];
- HelpType help ;
- int len, rc, q_line, flags, i, j;
- int oespace, avail, need, save_dont_use;
+ int len, q_line, flags, i, j;
int save_in_init;
int registered;
int ChangeAccessToken, ChangeRefreshToken, ChangeExpirationTime;
@@ -967,8 +978,7 @@ mm_login_oauth2(NETMBX *mb, char *user, char *method,
else{
flags = OE_APPEND_CURRENT;
sprintf(prompt, "%s: %s - %s: ", hostlabel, mb->orighost, userlabel);
- rc = optionally_enter(user, q_line, 0, NETMAXUSER,
- prompt, NULL, NO_HELP, &flags);
+ optionally_enter(user, q_line, 0, NETMAXUSER, prompt, NULL, NO_HELP, &flags);
}
user[NETMAXUSER-1] = '\0';
}
@@ -1111,7 +1121,7 @@ mm_login_oauth2(NETMBX *mb, char *user, char *method,
login->first_time++;
if(login->first_time){ /* count how many authorization methods we support */
- int nmethods, i, j;
+ int nmethods, j;
for(nmethods = 0, oa2 = alpine_oauth2_list; oa2 && oa2->name ; oa2++){
for(j = 0; j < OAUTH2_TOT_EQUIV
@@ -1234,7 +1244,7 @@ mm_login_oauth2(NETMBX *mb, char *user, char *method,
}
IDLIST *
-set_alpine_id(unsigned char *pname, unsigned char *pversion)
+set_alpine_id(char *pname, char *pversion)
{
IDLIST *id;
@@ -1529,8 +1539,7 @@ mm_login_work(NETMBX *mb, char *user, char **pwd, long int trial,
(mb->port != ntohs(sv->s_port))){
snprintf(non_def_port, sizeof(non_def_port), ":%lu", mb->port);
non_def_port[sizeof(non_def_port)-1] = '\0';
- dprint((9, "mm_login: using non-default port=%s\n",
- non_def_port ? non_def_port : "?"));
+ dprint((9, "mm_login: using non-default port=%s\n", non_def_port));
}
/*
diff --git a/alpine/imap.h b/alpine/imap.h
index 8bf02916..5adf275c 100644
--- a/alpine/imap.h
+++ b/alpine/imap.h
@@ -31,7 +31,7 @@ char *pine_newsrcquery(MAILSTREAM *, char *, char *);
int url_local_certdetails(char *);
void pine_sslfailure(char *, char *, unsigned long);
void mm_expunged_current(long unsigned int);
-IDLIST *set_alpine_id(unsigned char *, unsigned char *);
+IDLIST *set_alpine_id(char *, char *);
char *oauth2_get_access_code(unsigned char *, char *, OAUTH2_S *, int *);
void oauth2_set_device_info(OAUTH2_S *, char *);
int oauth2_elapsed_done(void *);
diff --git a/alpine/osdep/debuging.c b/alpine/osdep/debuging.c
index a8bee9bd..07e0d371 100644
--- a/alpine/osdep/debuging.c
+++ b/alpine/osdep/debuging.c
@@ -73,7 +73,9 @@ init_debug(void)
char nbuf[5];
char newfname[MAXPATH+1], filename[MAXPATH+1], *dfile = NULL;
char basename[MAXPATH+1];
+#ifdef DEBUGFILEEXT
struct stat sbuf;
+#endif /* DEBUGFILEEXT */
int i, fd;
if(!((debug || ps_global->debug_imap || ps_global->debug_tcp || ps_global->debug_http) && ps_global->write_debug_file))
diff --git a/alpine/reply.c b/alpine/reply.c
index 7ec610a6..184f9f4a 100644
--- a/alpine/reply.c
+++ b/alpine/reply.c
@@ -106,7 +106,6 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
REPLY_S reply;
void *msgtext = NULL;
char *tmpfix = NULL, *prefix = NULL, *fcc = NULL, *errmsg = NULL;
- char *hostpart;
long msgno, j, totalm, rflags, *seq = NULL;
int i, include_text = 0, times = -1, warned = 0, rv = 0,
flags = RSF_QUERY_REPLY_ALL, reply_raw_body = 0;
@@ -1015,9 +1014,8 @@ reply_text_query(struct pine *ps, long int many, ENVELOPE *env, char **prefix)
int ret, edited = 0, headers = 0;
static ESCKEY_S compose_style[MAX_REPLY_OPTIONS];
int ekey_num;
- int orig_sf;
- orig_sf = ps->reply.use_flowed = *prefix && **prefix ? (F_OFF(F_QUELL_FLOWED_TEXT, ps)
+ ps->reply.use_flowed = *prefix && **prefix ? (F_OFF(F_QUELL_FLOWED_TEXT, ps)
&& F_OFF(F_STRIP_WS_BEFORE_SEND, ps)
&& (strcmp(*prefix, "> ") == 0
|| strcmp(*prefix, ">") == 0)) : 0;
@@ -1068,8 +1066,6 @@ reply_text_query(struct pine *ps, long int many, ENVELOPE *env, char **prefix)
compose_style[ekey_num++].label = N_("Edit Indent String");
}
} else { /***** Alternate Reply Menu ********/
- unsigned which_help;
-
snprintf(tmp_20k_buf, SIZEOF_20KBUF, _("Include %s%soriginal message%s in Reply (using \"%s%s%s\")? "),
(many > 1L) ? comatose(many) : "",
(many > 1L) ? " " : "",
@@ -1198,7 +1194,7 @@ reply_text_query(struct pine *ps, long int many, ENVELOPE *env, char **prefix)
if(flags & OE_USER_MODIFIED){
fs_give((void **)prefix);
*prefix = removing_quotes(cpystr(buf));
- orig_sf = ps->reply.use_flowed = *prefix && **prefix ?
+ ps->reply.use_flowed = *prefix && **prefix ?
(F_OFF(F_QUELL_FLOWED_TEXT, ps)
&& F_OFF(F_STRIP_WS_BEFORE_SEND, ps)
&& (strcmp(*prefix, "> ") == 0
diff --git a/alpine/smime.c b/alpine/smime.c
index f119f394..37578fc1 100644
--- a/alpine/smime.c
+++ b/alpine/smime.c
@@ -1639,14 +1639,13 @@ void
smime_manage_certs_init(struct pine *ps, CONF_S **ctmp, CONF_S **first_line, WhichCerts ctype, int fline)
{
char tmp[200];
- char *ext;
CertList *data;
int i;
smime_init();
data = DATACERT(ctype);
- ext = EXTCERT(ctype);
+// ext = EXTCERT(ctype);
if(data == NULL || RENEWCERT(data))
renew_cert_data(&data, ctype);
@@ -1711,8 +1710,6 @@ smime_manage_certs_init(struct pine *ps, CONF_S **ctmp, CONF_S **first_line, Whi
for(cl = data, i = 0; cl; cl = cl->next)
if(cl->name){
- char *s, *t;
-
new_confline(ctmp);
(*ctmp)->d.s.ctype = ctype;
(*ctmp)->d.s.deleted = get_cert_deleted(ctype, i);
diff --git a/alpine/xoauth2.h b/alpine/xoauth2.h
index 2abd1fff..6e69c652 100644
--- a/alpine/xoauth2.h
+++ b/alpine/xoauth2.h
@@ -15,25 +15,25 @@
#ifndef ALPINE_XOAUTH2_INCLUDED
#define ALPINE_XOAUTH2_INCLUDED
-#define GMAIL_NAME "Gmail"
+#define GMAIL_NAME (unsigned char *) "Gmail"
#define GMAIL_ID "624395471329-0qee3goofj7kbl7hsukou3rqq0igntv1.apps.googleusercontent.com"
#define GMAIL_SECRET "vwnqVJQrJZpR6JilCfAN5nY7"
#define GMAIL_TENANT NULL
#define GMAIL_FLAGS (OA2_AUTHORIZE)
-#define OUTLOOK_NAME "Outlook"
+#define OUTLOOK_NAME (unsigned char *) "Outlook"
#define OUTLOOK_ID "f21dcaf2-8020-469b-8135-343bfc35d046"
#define OUTLOOK_SECRET "Tk-DAcEi13-FeSsY_Ja4Y.-MyL66I.wIPt"
#define OUTLOOK_TENANT "common"
#define OUTLOOK_FLAGS (OA2_DEVICE)
-#define YANDEX_NAME "Yandex"
+#define YANDEX_NAME (unsigned char *) "Yandex"
#define YANDEX_ID "393578fee26f47858023cf59681882a7"
#define YANDEX_SECRET "7304c4993583498f8ab63e2f21ad6960"
#define YANDEX_TENANT NULL
#define YANDEX_FLAGS (OA2_AUTHORIZE)
-#define YAHOO_NAME "Yahoo!"
+#define YAHOO_NAME (unsigned char *) "Yahoo!"
#define YAHOO_ID "dj0yJmk9RTdyZEQ2TWxGMzV6JmQ9WVdrOWVrTllZbGgyV2tjbWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PTli"
#define YAHOO_SECRET "3a8b12d51c09b0a5c0733c36d04cd3c69e33baef"
#define YAHOO_TENANT NULL
diff --git a/alpine/xoauth2conf.c b/alpine/xoauth2conf.c
index 71ecfb32..c62be3b5 100644
--- a/alpine/xoauth2conf.c
+++ b/alpine/xoauth2conf.c
@@ -76,7 +76,7 @@ int
same_xoauth2_info(XOAUTH2_INFO_S x, XOAUTH2_INFO_S y)
{
int rv = 0;
- if(x.name && y.name && !strcmp(x.name, y.name)
+ if(x.name && y.name && !strcmp((char *) x.name, (char *) y.name)
&& x.client_id && y.client_id && !strcmp(x.client_id, y.client_id)
&& ((!x.client_secret && !y.client_secret)
|| (x.client_secret && y.client_secret && !strcmp(x.client_secret, y.client_secret)))
@@ -125,11 +125,10 @@ xoauth_config_line(XOAUTH2_INFO_S *x)
{
size_t n;
char *rv;
- int i;
if(x == NULL) return NULL;
- n = strlen(XNAME) + strlen(x->name) + strlen(XID) + strlen(x->client_id)
+ n = strlen(XNAME) + strlen((char *) x->name) + strlen(XID) + strlen(x->client_id)
+ strlen(x->client_secret ? XSECRET : "") + strlen(x->client_secret ? x->client_secret : "")
+ strlen(x->tenant ? XTENANT : "") + strlen(x->tenant ? x->tenant : "")
+ strlen(XUSER) + strlen(x->users ? x->users : "")
@@ -182,8 +181,8 @@ xoauth_info_choice(XOAUTH2_INFO_S **xinfo, char *user)
char reply[1024];
int sel;
for(i = n = 0; xinfo[i] != NULL; i++)
- n += strlen(xinfo[i]->client_id); + 5; /* number, parenthesis, space */
- n += strlen(xinfo[0]->name) + strlen(user);
+ n += strlen(xinfo[i]->client_id) + 5; /* number, parenthesis, space */
+ n += strlen((char *) xinfo[0]->name) + strlen(user);
n += 1024; /* large enough to display to lines of 80 characters in UTF-8 */
s = fs_get(n*sizeof(char));
sprintf(s, _("Alpine cannot determine which client-id to use for the username <%s> for your %s account. "), user, xinfo[0]->name);
@@ -274,7 +273,7 @@ XOAUTH2_INFO_S *
oauth2_get_client_info(unsigned char *name, char *user)
{
int i, j, matches;
- char ***alval, **lval;
+ char **lval;
XOAUTH2_INFO_S *x, **xinfo;
if(name == NULL || *name == '\0' || user == NULL || *user == '\0')
@@ -285,13 +284,13 @@ oauth2_get_client_info(unsigned char *name, char *user)
lval = ps_global->vars[V_XOAUTH2_INFO].current_val.l;
for(i = 0; lval && lval[i]; i++){
x = xoauth_parse_client_info(lval[i]);
- if(x && x->name && name && !strcmp(x->name, name))
+ if(x && x->name && name && !strcmp((char *) x->name, (char *) name))
matches++;
free_xoauth2_info(&x);
}
/* if nothing, use the default value */
- for(i = 0; xoauth_default[i].name != NULL && strcmp(xoauth_default[i].name, name); i++);
+ for(i = 0; xoauth_default[i].name != NULL && strcmp((char *) xoauth_default[i].name, (char *) name); i++);
if(xoauth_default[i].name) matches++;
if(matches == 0) return NULL;
@@ -303,13 +302,13 @@ oauth2_get_client_info(unsigned char *name, char *user)
matches = 0; /* restart the recount, it might go lower! */
for(i = 0; lval && lval[i]; i++){
x = xoauth_parse_client_info(lval[i]);
- if(x && x->name && name && !strcmp(x->name, name)){
+ if(x && x->name && name && !strcmp((char *) x->name, (char *) name)){
for(j = 0; xinfo && xinfo[j] && !same_xoauth2_info(*x, *xinfo[j]); j++);
if(!xinfo[j]) xinfo[matches++] = copy_xoauth2_info(x);
}
free_xoauth2_info(&x);
}
- for(i = 0; xoauth_default[i].name != NULL && strcmp(xoauth_default[i].name, name); i++);
+ for(i = 0; xoauth_default[i].name != NULL && strcmp((char *) xoauth_default[i].name, (char *) name); i++);
for(j = 0; xinfo && xinfo[j] && !same_xoauth2_info(xoauth_default[i], *xinfo[j]); j++);
if(!xinfo[j]) xinfo[matches++] = copy_xoauth2_info(&xoauth_default[i]);
@@ -353,7 +352,7 @@ oauth2_get_client_info(unsigned char *name, char *user)
/* Once the user chose a client-id, save it so we do not ask again */
if(x != NULL){
int n = x->users ? strlen(x->users) + 1 : 0;
- char ***alval, **l;
+ char ***alval;
fs_resize((void **) &x->users, (n + strlen(user) + 1)*sizeof(char));
x->users[n > 0 ? n - 1 : 0] = '\0';
@@ -382,7 +381,7 @@ void
write_xoauth_configuration(struct variable *v, struct variable **vlist, EditWhich ew)
{
int i, k, m, n;
- XOAUTH2_INFO_S *x = NULL, *y;
+ XOAUTH2_INFO_S *x = NULL;
char ***alval, **lval, **l;
char *p;
@@ -397,9 +396,9 @@ write_xoauth_configuration(struct variable *v, struct variable **vlist, EditWhi
for (i = 0, k = 0; vlist[i] != NULL; i++){
if(x == NULL){
x = new_xoauth2_info();
- x->name = cpystr(vlist[i]->descrip); /* hack! but makes life so much easier! */
+ x->name = (unsigned char *) cpystr(vlist[i]->descrip); /* hack! but makes life so much easier! */
for(m = 0; xoauth_default[m].name != NULL
- && strcmp(xoauth_default[m].name, x->name); m++);
+ && strcmp((char *) xoauth_default[m].name, (char *) x->name); m++);
}
if (x->client_id == NULL && !strcmp(vlist[i]->name, XOAUTH2_CLIENT_ID)){
p = PVAL(vlist[i], ew);
@@ -474,7 +473,7 @@ xoauth_parse_client_info(char *lvalp)
for(t = s; *t && *t != '"' && *t != ' '; t++);
c = *t;
*t = '\0';
- if (*s) x->name = cpystr(s);
+ if (*s) x->name = (unsigned char *) cpystr(s);
*t = c;
} else x->name = NULL;
@@ -534,7 +533,7 @@ xoauth_parse_client_info(char *lvalp)
char **
xoauth2_conf_dedup_and_merge(char ***alval)
{
- int i, j, k, l, n, m;
+ int i, j, l, m;
char **lval, **rv;
XOAUTH2_INFO_S *x, *y;
@@ -602,7 +601,7 @@ write_xoauth_conf_entry(XOAUTH2_INFO_S *x, XOAUTH2_INFO_S *y, CONF_S **cl, CONF_
{
CONF_S *ctmpb = *clb;
struct variable **varlist;
- int i, p = *pp;
+ int p = *pp;
char tmp[1024], tmp2[16];
sprintf(tmp2, "%d", key);
@@ -613,7 +612,7 @@ write_xoauth_conf_entry(XOAUTH2_INFO_S *x, XOAUTH2_INFO_S *y, CONF_S **cl, CONF_
(*cl)->flags |= CF_NOSELECT;
(*cl)->help = NO_HELP;
(*cl)->valoffset = 1;
- (*cl)->value = cpystr(x->name);
+ (*cl)->value = cpystr((char *) x->name);
(*cl)->varname = NULL;
(*cl)->varnamep = ctmpb = *cl;
@@ -627,7 +626,7 @@ write_xoauth_conf_entry(XOAUTH2_INFO_S *x, XOAUTH2_INFO_S *y, CONF_S **cl, CONF_
&& strcmp(x->client_id, y->client_id) ? cpystr(x->client_id) : NULL;
varlist[p]->global_val.p = y->client_id ? cpystr(y->client_id) : NULL;
varlist[p]->dname = cpystr(tmp2); /* hack, but makes life easier! */
- varlist[p]->descrip = cpystr(x->name); /* hack, but makes life easier! */
+ varlist[p]->descrip = cpystr((char *) x->name); /* hack, but makes life easier! */
set_current_val(varlist[p], FALSE, FALSE);
/* Write client-id variable */
@@ -655,7 +654,7 @@ write_xoauth_conf_entry(XOAUTH2_INFO_S *x, XOAUTH2_INFO_S *y, CONF_S **cl, CONF_
? cpystr(x->client_secret) : NULL;
varlist[p]->global_val.p = y->client_secret ? cpystr(y->client_secret) : NULL;
varlist[p]->dname = cpystr(tmp2); /* hack, but makes life easier! */
- varlist[p]->descrip = cpystr(x->name); /* hack, but makes life easier! */
+ varlist[p]->descrip = cpystr((char *) x->name); /* hack, but makes life easier! */
set_current_val(varlist[p], FALSE, FALSE);
/* Write client-secret variable */
@@ -683,7 +682,7 @@ write_xoauth_conf_entry(XOAUTH2_INFO_S *x, XOAUTH2_INFO_S *y, CONF_S **cl, CONF_
? cpystr(x->tenant) : NULL;
varlist[p]->global_val.p = y->tenant ? cpystr(y->tenant) : NULL;
varlist[p]->dname = cpystr(tmp2); /* hack, but makes life easier! */
- varlist[p]->descrip = cpystr(x->name); /* hack, but makes life easier! */
+ varlist[p]->descrip = cpystr((char *) x->name); /* hack, but makes life easier! */
set_current_val(varlist[p], FALSE, FALSE);
/* Write client-secret variable */
@@ -710,7 +709,7 @@ write_xoauth_conf_entry(XOAUTH2_INFO_S *x, XOAUTH2_INFO_S *y, CONF_S **cl, CONF_
varlist[p]->main_user_val.p = cpystr(x->flow);
varlist[p]->global_val.p = cpystr(x->flow);
varlist[p]->dname = cpystr(tmp2); /* hack, but makes life easier! */
- varlist[p]->descrip = cpystr(x->name); /* hack, but makes life easier! */
+ varlist[p]->descrip = cpystr((char *) x->name); /* hack, but makes life easier! */
set_current_val(varlist[p], FALSE, FALSE);
/* Write client-secret variable */
@@ -736,7 +735,7 @@ write_xoauth_conf_entry(XOAUTH2_INFO_S *x, XOAUTH2_INFO_S *y, CONF_S **cl, CONF_
varlist[p]->is_list = 1;
varlist[p]->main_user_val.l = x->users ? array_to_list(x->users) : NULL;
varlist[p]->dname = cpystr(tmp2); /* hack, but makes life easier! */
- varlist[p]->descrip = cpystr(x->name); /* hack, but makes life easier! */
+ varlist[p]->descrip = cpystr((char *) x->name); /* hack, but makes life easier! */
set_current_val(varlist[p], FALSE, FALSE);
/* Write user variable */
@@ -785,20 +784,15 @@ void
alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
{
struct variable **varlist = NULL;
- char tmp[MAXPATH+1], *pval, **lval, ***alval;
- char *s, *extraname = NULL;
- char *name, *id, *tenant, *secret, **user;
- char *name_lval, *id_lval, *tenant_lval, *secret_lval, *user_lval,
- *id_def, *tenant_def, *secret_def;
- int i, j, k, l, p, q, ln = 0, readonly_warning = 0, pos, count_vars;
+ char **lval, ***alval;
+ int i, j, k, p, ln = 0, readonly_warning = 0, pos, count_vars;
XTYPES m;
CONF_S *ctmpa = NULL, *ctmpb, *first_line;
- FEATURE_S *feature;
PINERC_S *prc = NULL;
OPT_SCREEN_S screen;
- int expose_hidden_config, add_hidden_vars_title = 0;
+ int expose_hidden_config;
SAVED_CONFIG_S *vsave;
- XOAUTH2_INFO_S x, *y;
+ XOAUTH2_INFO_S *y;
dprint((3, "-- alpine_xoauth2_configuration --\n"));
@@ -842,7 +836,7 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
for(i = 0, count_vars = 0; xoauth_default[i].name != NULL; i++){
/* always start with the default configuration */
- for(k = 0, q = 0; lval && lval[k]; k++){
+ for(k = 0; lval && lval[k]; k++){
y = xoauth_parse_client_info(lval[k]);
if(same_xoauth2_info(xoauth_default[i], *y))
break;
@@ -855,7 +849,7 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
}
for(k = 0; lval && lval[k]; k++){
y = xoauth_parse_client_info(lval[k]);
- if(y && (!y->name || strcmp(y->name, xoauth_default[i].name))){
+ if(y && (!y->name || strcmp((char *) y->name, (char *) xoauth_default[i].name))){
free_xoauth2_info(&y);
continue;
}
@@ -879,7 +873,7 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
for(i = 0, p = 0; xoauth_default[i].name != NULL; i++){
/* always start with the default configuration */
- for(k = 0, q = 0; lval && lval[k]; k++){
+ for(k = 0; lval && lval[k]; k++){
y = xoauth_parse_client_info(lval[k]);
if(same_xoauth2_info(xoauth_default[i], *y))
break;
@@ -889,7 +883,7 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
OAUTH2_S *oa2list;
for(oa2list = alpine_oauth2_list; oa2list && oa2list->name; oa2list++){
if(oa2list->hide) continue;
- if(!strcmp(oa2list->name,xoauth_default[i].name)){
+ if(!strcmp((char *) oa2list->name, (char *) xoauth_default[i].name)){
xoauth_default[i].flow = cpystr(oa2list->server_mthd[0].name ? "Authorize"
: (oa2list->server_mthd[1].name ? "Device" : "Unknown"));
write_xoauth_conf_entry(&xoauth_default[i], &xoauth_default[i], &ctmpa, &ctmpb,
@@ -899,11 +893,11 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
}
}
}
- for(k = 0, q = 0; lval && lval[k]; k++){
+ for(k = 0; lval && lval[k]; k++){
OAUTH2_S *oa2list, *oa2;
y = xoauth_parse_client_info(lval[k]);
- if(y && (!y->name || strcmp(y->name, xoauth_default[i].name))){
+ if(y && (!y->name || strcmp((char *) y->name, (char *) xoauth_default[i].name))){
free_xoauth2_info(&y);
continue;
}
@@ -914,7 +908,7 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
if(y->tenant == NULL && xoauth_default[i].tenant != NULL)
y->tenant = cpystr(xoauth_default[i].tenant);
for(oa2 = NULL, oa2list = alpine_oauth2_list; oa2 == NULL && oa2list; oa2list++)
- if(!strcmp(oa2list->name, y->name)) oa2 = oa2list;
+ if(!strcmp((char *) oa2list->name, (char *) y->name)) oa2 = oa2list;
if(oa2 && y->flow == NULL)
y->flow = cpystr(oa2->server_mthd[0].name ? "Authorize"
: (oa2->server_mthd[1].name ? "Device" : "Unknown"));
@@ -951,7 +945,7 @@ alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
if(optionally_enter(service,
-(ps_global->ttyo ? FOOTER_ROWS(ps_global) : 3),
0, sizeof(service), prompt, NULL, NO_HELP, &flags) == 0){
- for(i = 0; xoauth_default[i].name != NULL && strucmp(xoauth_default[i].name, service); i++);
+ for(i = 0; xoauth_default[i].name != NULL && strucmp((char *) xoauth_default[i].name, service); i++);
if(xoauth_default[i].name == NULL)
q_status_message1(SM_ORDER, 3, 3, _("Service %s not known"), service);
else{
diff --git a/pico/display.c b/pico/display.c
index 705dae10..fe92cbd8 100644
--- a/pico/display.c
+++ b/pico/display.c
@@ -425,7 +425,6 @@ update(void)
int j;
int scroll = 0;
int repaint= 0;
- int quoted;
CELL c;
PCOLORS *pcolors = Pmaster && Pmaster->colors ? Pmaster->colors : Pcolors;
@@ -989,12 +988,12 @@ updext(void)
void
updatelinecolor (int row, CELL vline[], CELL pline[], short *flags, int len)
{
- CELL *cp1, *cp2, *cp3, *cp4, *cp5, *cp6, *cp7;
+ CELL *cp1, *cp2, *cp3, *cp4, *cp5;
int nbflag; /* non-blanks to the right flag? */
int cleartoeol = 0;
- int in_quote, quote_found = 0, level;
+ int in_quote, level;
PCOLORS *pcolors = Pmaster && Pmaster->colors ? Pmaster->colors : Pcolors;
- COLOR_PAIR *qcolor = NULL, *lastc = NULL, *pcolor = NULL;
+ COLOR_PAIR *lastc = NULL, *pcolor = NULL;
int first = 1, lastattr = -1, change = 0;
if(pcolors == NULL){
@@ -1585,9 +1584,7 @@ speller_choice(char **sp_list, int *choice)
ch_dict = -1;
if(ch_dict < 0){ /* not a choice yet? do one now! */
- UCS buf[128];
int i;
- char *utf8_prompt;
UCS *ucs4_prompt;
EXTRAKEYS menu_dictionary[] = {
{"0", NULL, '0'},
@@ -1608,7 +1605,6 @@ speller_choice(char **sp_list, int *choice)
if(cnt < 10)
menu_dictionary[cnt].name = NULL;
- buf[0] = '\0';
/* write the prompt in utf8, and let internal functions translate it to ucs4 */
ucs4_prompt = utf8_to_ucs4_cpystr(_("Choose Dictionary: "));
@@ -1638,7 +1634,6 @@ mlchoose(UCS *prompt, EXTRAKEYS *extras)
UCS c;
UCS buf[NLINE];
int i;
- int changed = FALSE;
int return_val = 0;
KEYMENU menu_choose[12];
COLOR_PAIR *lastc = NULL;
diff --git a/pico/main.c b/pico/main.c
index 1001edd1..94b60adc 100644
--- a/pico/main.c
+++ b/pico/main.c
@@ -495,10 +495,9 @@ void
display_color_codes(void)
{
#define SPACES " "
- int i, j, k, l, a, len, len_entry, row;
+ int i, k, l, a;
int ncolors;
COLOR_PAIR *lastc = NULL, *newcp;
- char *fg;
/* this is the format "SPACE COLORED_SPACES = CODE SPACE" */
vtterminalinfo(gmode & MDTCAPWINS);
diff --git a/pico/search.c b/pico/search.c
index 282e37e9..387cc2ef 100644
--- a/pico/search.c
+++ b/pico/search.c
@@ -469,7 +469,7 @@ replace_pat(UCS *defpat, int *wrapt, int bsearch)
char utf8tmp[NPMT];
UCS prompt[NPMT];
UCS *promptp;
- int i, flags;
+ int flags;
if(bsearch){
flags = SR_BACKWRD;
diff --git a/pith/ical.c b/pith/ical.c
index 2d61c00e..7022bb55 100644
--- a/pith/ical.c
+++ b/pith/ical.c
@@ -459,7 +459,6 @@ void
ical_free_vtimezone(void **vtzpv)
{
VTIMEZONE_S **vtzp = (VTIMEZONE_S **) vtzpv;
- TZ_comp i,j;
if(vtzp == NULL || *vtzp == NULL) return;
@@ -487,7 +486,6 @@ void
ical_free_valarm(void **valarmpv)
{
VALARM_S **valarmp = (VALARM_S **) valarmpv;
- int i, j;
if(valarmp == NULL || *valarmp == NULL) return;
@@ -1878,7 +1876,6 @@ ical_set_date(ICLINE_S *icl, VTIMEZONE_S *vtz)
ICAL_PARAMETER_S *param;
char *tz = NULL;
struct tm ic_date;
- time_t t;
if(icl == NULL) return;
@@ -2183,7 +2180,6 @@ ical_vevent_summary(VCALENDAR_S *vcal)
VEVENT_S *vevent;
GEN_ICLINE_S *gicl;
ICLINE_S *icl;
- char *k;
if(vcal == NULL) return NULL;
@@ -2542,13 +2538,13 @@ ical_vevent_summary(VCALENDAR_S *vcal)
}
if(*t == ','){
*u = '\0';
- rv->description[i++] = cpystr(ical_decode(s, vcal->encoding));
+ rv->description[i++] = (unsigned char *) cpystr((char *) ical_decode(s, vcal->encoding));
s = u = t+1;
} else
*u++ = *t;
}
*u = '\0';
- rv->description[i++] = cpystr(ical_decode(s, vcal->encoding));
+ rv->description[i++] = (unsigned char *) cpystr((char *) ical_decode(s, vcal->encoding));
rv->description[i] = NULL;
fs_give((void **)&v);
} /* end of if(description) */
diff --git a/pith/mailview.c b/pith/mailview.c
index c2c7842c..f032a0b2 100644
--- a/pith/mailview.c
+++ b/pith/mailview.c
@@ -387,8 +387,6 @@ format_calendar_vevent(VCALENDAR_S *vcal, ATTACH_S *a, HANDLE_S **handlesp, int
if(cflags & FC_SUMMARY){
COLOR_PAIR *lastc = NULL;
- char numbuf[50];
- int thisdescwid;
COLOR_PAIR *hdrcolor = NULL;
if((flgs & FM_DISPLAY)
@@ -508,7 +506,7 @@ format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int w
for(a = ps_global->atmts; a->description != NULL; a++){
if(MIME_VCALENDAR(a->body->type, a->body->subtype)){
- b = mail_body (ps_global->mail_stream, msgno, a->number);
+ b = mail_body (ps_global->mail_stream, msgno, (unsigned char *) a->number);
if(b == NULL){
gf_puts(_("Error fetching calendar body part"), pc);
gf_puts(NEWLINE, pc);
@@ -524,7 +522,7 @@ format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int w
rawtext[callen] = '\0'; /* chop off cookie */
switch(b->encoding){
case ENCBASE64:
- caltext = rfc822_base64(rawtext, strlen(rawtext), &callen);
+ caltext = rfc822_base64((unsigned char *) rawtext, strlen(rawtext), &callen);
if(caltext == NULL){
gf_puts(_("Error in calendar base64 encoding"), pc);
gf_puts(NEWLINE, pc);
diff --git a/pith/save.c b/pith/save.c
index fe7f974f..fb533228 100644
--- a/pith/save.c
+++ b/pith/save.c
@@ -1721,10 +1721,8 @@ save_ex_explain_parts(struct mail_bodystruct *body, int depth, long unsigned int
int
save_ex_output_text(char *text, int depth, unsigned long *len, gf_io_t pc)
{
- int starti, i, j, startpos, pos, rv;
- int line_len = 68 - depth;
+ int starti, i, startpos, pos, rv;
char tmp[100]; /* a number bigger than 68, we justify text here. */
- char *s;
unsigned long ilen;
rv = 0;
@@ -1735,7 +1733,7 @@ save_ex_output_text(char *text, int depth, unsigned long *len, gf_io_t pc)
startpos = pos;
for(starti = i = depth; i < 68 && text[pos] != '\0'; i++, pos++){
tmp[i] = text[pos];
- if(tmp[i] == ' '){ /* save when we reach a space */
+ if(tmp[i] == ' '){ /* save when we reach a space */
starti = i;
startpos = pos;
}
diff --git a/pith/smime.c b/pith/smime.c
index 72801cd6..16d72990 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -2768,7 +2768,6 @@ smime_extract_and_save_cert(PKCS7 *p7)
X509 *x, *cert;
char **email;
int i, j, rv, already_saved;
- long error;
/* any signers for this message? */
if((signers = PKCS7_get0_signers(p7, NULL, 0)) == NULL)
@@ -3263,7 +3262,6 @@ decrypt_file(char *fp, int *rv, PERSONAL_CERT *pc)
PKCS7 *p7 = NULL;
char *text, *tmp;
BIO *in = NULL, *out = NULL;
- int i, j;
long unsigned int len;
void *ret;
diff --git a/pith/smkeys.c b/pith/smkeys.c
index 760c4b1d..024c8240 100644
--- a/pith/smkeys.c
+++ b/pith/smkeys.c
@@ -201,7 +201,7 @@ ALPINE_self_signed_certificate(char *template, int version, char *pathdir, char
if((req = X509_REQ_new()) != NULL
&& X509_REQ_set_version(req, 0L)){
name = X509_REQ_get_subject_name(req);
- X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, "Password File Certificate and Key Pair", -1, -1, 0);
+ X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char *) "Password File Certificate and Key Pair", -1, -1, 0);
if(X509_REQ_set_pubkey(req, pkey)
&& (pcert = X509_new()) != NULL){
if(X509_set_version(pcert, version)
@@ -241,7 +241,6 @@ ALPINE_self_signed_certificate(char *template, int version, char *pathdir, char
build_path(tmp, pathdir, certfile, sizeof(tmp));
if((fp = fopen(tmp, "w")) != NULL
&&(out = BIO_new_fp(fp, BIO_FP_TEXT)) != NULL){
- EVP_PKEY *tpubkey = X509_REQ_get0_pubkey(req);
PEM_write_bio_X509(out, pcert);
BIO_flush(out);
BIO_free(out);