1:warning: comparison between signed and unsigned integer expressions
解决方法:强制类型转换 前面都加上(int),进行强制类型转换
if (key == NULL || (int)strlen(key) >(int)I_LIMITED_SIMPLE || strlen(key) < 1)
// if (key == NULL || strlen(key) > I_LIMITED_SIMPLE || strlen(key) < 1)
2: warning: ‘unsigned int sdk_req::m_nBufferLength’
添加语句
#define UNUSED_VAR __attribute__ ((unused))
for any variable just use the above macro before its type for example:
如:在原来变量前面添加UNUSED_VAR,即可UNUSED_VAR int a = 2;
static const char* V_REQUEST_STATE_END = "END";
static const char* V_REQUEST_STATE_DOING = "DOING";
UNUSED_VAR static const char* V_REQUEST_STATE_IDLE = "IDLE";
UNUSED_VAR static const char* V_REQUEST_STATE_RELEASE = "RELEASE";
UNUSED_VAR static const char* V_REQUEST_CONNECT_KEEP = "Keep-Alive";
UNUSED_VAR static const char* V_REQUEST_CONNECT_CLOSE = "Close";
3: warning: suggest parentheses around assignment used as truth value
解决方法:在if判断语句中添加个()
if ((tmpLen = atoi(m_reqHttpRequest.GetHttpHeader(H_CONTENT_LENGTH).c_str())) > 0)
// if (tmpLen = atoi(m_reqHttpRequest.GetHttpHeader(H_CONTENT_LENGTH).c_str()) > 0)
原文地址:http://blog.csdn.net/lanjiangzhou/article/details/45649501