我在C中有一个函数,其中包含以下行:
while (src=strstr(src,key)) {
memmove(src,src+strlen(key),1+strlen(src+strlen(key)));
}
当我运行parasoft来检查函数时,我从这些行中收到了很多错误:
Not enclosed with brackets assignment was found in 'while' condition expression
LHS operand of '+' operator is 'unsigned long'
LHS operand of '+' operator is 'unsigned long'
LHS operand of '+' operator is 'unsigned long'
RHS operand of '+' operator is 'unsigned long'
RHS operand of '+' operator is 'unsigned long'
RHS operand of '+' operator is 'unsigned long'
Third param to 'memmove' function depends on second: src, key
你知道这些错误的来源吗?
答案 0 :(得分:1)
第一条消息是因为该工具怀疑你的意思是:
while ((src = strstr(src, key))) {
为了明确指定作业,有些工具希望你写
DLFileEntryLocalServiceUtil.getFileEntry(long groupId, long folderId, java.lang.String title)