Fix a lot of MinGW/GCC warnings
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6168 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
e918dd8a27
commit
cf4e5cf132
31 changed files with 92 additions and 87 deletions
|
@ -79,7 +79,7 @@ JNL_HTTPGet::~JNL_HTTPGet()
|
|||
}
|
||||
|
||||
|
||||
void JNL_HTTPGet::addheader(char *header)
|
||||
void JNL_HTTPGet::addheader(const char *header)
|
||||
{
|
||||
//if (strstr(header,"\r") || strstr(header,"\n")) return;
|
||||
if (!m_sendheaders)
|
||||
|
@ -141,7 +141,7 @@ void JNL_HTTPGet::do_encode_mimestr(char *in, char *out)
|
|||
}
|
||||
|
||||
|
||||
void JNL_HTTPGet::connect(char *url)
|
||||
void JNL_HTTPGet::connect(const char *url)
|
||||
{
|
||||
deinit();
|
||||
m_http_url=(char*)malloc(strlen(url)+1);
|
||||
|
@ -236,7 +236,7 @@ void JNL_HTTPGet::connect(char *url)
|
|||
|
||||
}
|
||||
|
||||
static int my_strnicmp(char *b1, char *b2, int l)
|
||||
static int my_strnicmp(const char *b1, const char *b2, int l)
|
||||
{
|
||||
while (l-- && *b1 && *b2)
|
||||
{
|
||||
|
@ -249,13 +249,13 @@ static int my_strnicmp(char *b1, char *b2, int l)
|
|||
return 0;
|
||||
}
|
||||
|
||||
char *_strstr(char *i, char *s)
|
||||
char *_strstr(char *i, const char *s)
|
||||
{
|
||||
if (strlen(i)>=strlen(s)) while (i[strlen(s)-1])
|
||||
{
|
||||
int l=strlen(s)+1;
|
||||
char *ii=i;
|
||||
char *is=s;
|
||||
const char *is=s;
|
||||
while (--l>0)
|
||||
{
|
||||
if (*ii != *is) break;
|
||||
|
@ -318,13 +318,13 @@ void JNL_HTTPGet::do_parse_url(char *url, char **host, int *port, char **req, ch
|
|||
}
|
||||
|
||||
|
||||
char *JNL_HTTPGet::getallheaders()
|
||||
const char *JNL_HTTPGet::getallheaders()
|
||||
{ // double null terminated, null delimited list
|
||||
if (m_recvheaders) return m_recvheaders;
|
||||
else return "\0\0";
|
||||
}
|
||||
|
||||
char *JNL_HTTPGet::getheader(char *headername)
|
||||
char *JNL_HTTPGet::getheader(const char *headername)
|
||||
{
|
||||
char *ret=NULL;
|
||||
if (strlen(headername)<1||!m_recvheaders) return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue