diff options
author | u.harbuz <u.harbuz@samsung.com> | 2017-05-25 17:42:39 +0200 |
---|---|---|
committer | u.harbuz <u.harbuz@samsung.com> | 2017-05-26 09:45:01 +0200 |
commit | 80352ee161fb86501c2543be4d3bad185fda4f22 (patch) | |
tree | 7cf4b9bd3e544798d7bb6a7b67f3977a3c360f1c | |
parent | 0a4a8339520b245f2cd2a2c354225ed084096979 (diff) | |
download | xmlsec1-accepted/tizen/4.0/unified/20170816.013358.tar.gz xmlsec1-accepted/tizen/4.0/unified/20170816.013358.tar.bz2 xmlsec1-accepted/tizen/4.0/unified/20170816.013358.zip |
Fix compilation warnings.submit/tizen_4.0/20170811.094300submit/tizen/20170529.050320accepted/tizen/unified/20170531.082637accepted/tizen/4.0/unified/20170816.013358
Change-Id: Id72252c050659e02c650bf58c19d9301c83c22d6
-rw-r--r-- | src/errors.c | 3 | ||||
-rw-r--r-- | src/io.c | 6 | ||||
-rw-r--r-- | src/openssl/app.c | 8 | ||||
-rw-r--r-- | src/xmldsig.c | 8 | ||||
-rw-r--r-- | src/xmltree.c | 4 |
5 files changed, 15 insertions, 14 deletions
diff --git a/src/errors.c b/src/errors.c index 2ff1f42a..a4519270 100644 --- a/src/errors.c +++ b/src/errors.c @@ -229,9 +229,8 @@ xmlSecError(const char* file, int line, const char* func, if(msg != NULL) { va_list va; - va_start(va, msg); - xmlSecStrVPrintf(error_msg, sizeof(error_msg), BAD_CAST msg, va); + xmlSecStrVPrintf(error_msg, sizeof(error_msg), msg, va); error_msg[sizeof(error_msg) - 1] = '\0'; va_end(va); } else { @@ -423,13 +423,14 @@ xmlSecTransformInputURIOpen(xmlSecTransformPtr transform, const xmlChar *uri) { char buf[ERR_BUF_SIZE]; if((ctx->clbks == NULL) || (ctx->clbksCtx == NULL)) { + strerror_r(errno, buf, sizeof(buf)); xmlSecError(XMLSEC_ERRORS_HERE, xmlSecErrorsSafeString(xmlSecTransformGetName(transform)), "opencallback", XMLSEC_ERRORS_R_IO_FAILED, "uri=%s;error=%s", xmlSecErrorsSafeString(uri), - strerror_r(errno, buf, sizeof(buf))); + buf); return(-1); } @@ -523,11 +524,12 @@ xmlSecTransformInputURIPopBin(xmlSecTransformPtr transform, xmlSecByte* data, ret = (ctx->clbks->readcallback)(ctx->clbksCtx, (char*)data, (int)maxDataSize); if(ret < 0) { char buf[ERR_BUF_SIZE]; + strerror_r(errno, buf, sizeof(buf)); xmlSecError(XMLSEC_ERRORS_HERE, xmlSecErrorsSafeString(xmlSecTransformGetName(transform)), "readcallback", XMLSEC_ERRORS_R_IO_FAILED, - "error=%s", strerror_r(errno, buf, sizeof(buf))); + "error=%s", buf); return(-1); } (*dataSize) = ret; diff --git a/src/openssl/app.c b/src/openssl/app.c index 8e519883..d7bb79ef 100644 --- a/src/openssl/app.c +++ b/src/openssl/app.c @@ -1560,9 +1560,9 @@ xmlSecOpenSSLDefaultPasswordCallback(char *buf, int bufsize, int verify, void *u /* try 3 times */ for(i = 0; i < 3; i++) { if(filename != NULL) { - xmlSecStrPrintf(prompt, sizeof(prompt), BAD_CAST "Enter password for \"%s\" file: ", filename); + xmlSecStrPrintf(prompt, sizeof(prompt), "Enter password for \"%s\" file: ", filename); } else { - xmlSecStrPrintf(prompt, sizeof(prompt), BAD_CAST "Enter password: "); + xmlSecStrPrintf(prompt, sizeof(prompt), "Enter password: "); } ret = EVP_read_pw_string(buf, bufsize, (char*)prompt, 0); if(ret != 0) { @@ -1580,9 +1580,9 @@ xmlSecOpenSSLDefaultPasswordCallback(char *buf, int bufsize, int verify, void *u } if(filename != NULL) { - xmlSecStrPrintf(prompt, sizeof(prompt), BAD_CAST "Enter password for \"%s\" file again: ", filename); + xmlSecStrPrintf(prompt, sizeof(prompt), "Enter password for \"%s\" file again: ", filename); } else { - xmlSecStrPrintf(prompt, sizeof(prompt), BAD_CAST "Enter password again: "); + xmlSecStrPrintf(prompt, sizeof(prompt), "Enter password again: "); } buf2 = (char*)xmlMalloc(bufsize); diff --git a/src/xmldsig.c b/src/xmldsig.c index 8e156e2c..304a869b 100644 --- a/src/xmldsig.c +++ b/src/xmldsig.c @@ -918,13 +918,13 @@ xmlSecDecodeCmp(const xmlChar* encoded, const xmlChar* plain) { xmlSecAssert2(encoded != NULL, -1); xmlSecAssert2(plain != NULL, -1); - while(*plain != NULL) { - if(*encoded == NULL) + while(*plain != '\0') { + if(*encoded == '\0') return(-1); /* check encoded char is same with plain char */ if(*encoded == '%') { - if(*(encoded + 1) == NULL && *(encoded + 2) == NULL) + if(*(encoded + 1) == '\0' &&*(encoded + 2) == '\0') return(-1); if((int)*plain != @@ -984,7 +984,7 @@ xmlSecDSigCtxProcessReferences(xmlSecDSigCtxPtr dsigCtx, xmlNodePtr firstReferen xmlSecProxyCtxPtr pc = dsigCtx->skipReferences; while(pc != NULL) { - if(strncmp(refUri, pc->cache, xmlStrlen(refUri)) == 0) { + if(strncmp((char*)refUri, (char*)pc->cache, xmlStrlen(refUri)) == 0) { isInProxy = 1; xmlSecError(XMLSEC_ERRORS_HERE, NULL, diff --git a/src/xmltree.c b/src/xmltree.c index a675cbc9..3ef7f977 100644 --- a/src/xmltree.c +++ b/src/xmltree.c @@ -841,7 +841,7 @@ xmlSecGenerateID(const xmlChar* prefix, xmlSecSize len) { return(NULL); } - xmlSecStrPrintf(tmp, tmpLen, BAD_CAST "%s%s", prefix, res); + xmlSecStrPrintf(tmp, tmpLen, "%s%s", prefix, res); xmlFree(res); res = tmp; } else { @@ -1055,7 +1055,7 @@ xmlSecGetQName(xmlNodePtr node, const xmlChar* href, const xmlChar* local) { xmlSecErrorsSafeString(node->name)); return(NULL); } - xmlSecStrPrintf(qname, len, BAD_CAST "%s:%s", ns->prefix, local); + xmlSecStrPrintf(qname, len, "%s:%s", ns->prefix, local); } else { qname = xmlStrdup(local); if(qname == NULL) { |