silence warnings from clang ccc-analyzer
This commit is contained in:
parent
ce24523b59
commit
81ce160d83
|
@ -929,7 +929,7 @@ void buffer_path_simplify(buffer *dest, buffer *src)
|
|||
walk++;
|
||||
}
|
||||
|
||||
pre2 = pre1 = 0;
|
||||
pre1 = 0;
|
||||
c = *(walk++);
|
||||
/* prefix with '/' if not already present */
|
||||
if (c != '/') {
|
||||
|
|
|
@ -166,6 +166,8 @@ static int config_insert(server *srv) {
|
|||
srv->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
|
||||
|
||||
force_assert(srv->config_storage);
|
||||
force_assert(srv->config_context->used); /* static analysis hint for ccc
|
||||
-analyzer */
|
||||
|
||||
for (i = 0; i < srv->config_context->used; i++) {
|
||||
data_config const* config = (data_config const*)srv->config_context->data[i];
|
||||
|
|
|
@ -2406,7 +2406,7 @@ static int fcgi_response_parse(server *srv, connection *con, plugin_data *p, buf
|
|||
/* found the file */
|
||||
|
||||
/* parse range */
|
||||
begin_range = 0; end_range = sce->st.st_size - 1;
|
||||
end_range = sce->st.st_size - 1;
|
||||
{
|
||||
char *rpos = NULL;
|
||||
errno = 0;
|
||||
|
|
|
@ -590,7 +590,6 @@ static int webdav_delete_dir(server *srv, connection *con, plugin_data *p, physi
|
|||
|
||||
while(NULL != (de = readdir(dir))) {
|
||||
struct stat st;
|
||||
int status = 0;
|
||||
|
||||
if ((de->d_name[0] == '.' && de->d_name[1] == '\0') ||
|
||||
(de->d_name[0] == '.' && de->d_name[1] == '.' && de->d_name[2] == '\0')) {
|
||||
|
@ -614,6 +613,7 @@ static int webdav_delete_dir(server *srv, connection *con, plugin_data *p, physi
|
|||
|
||||
/* try to unlink it */
|
||||
if (-1 == rmdir(d.path->ptr)) {
|
||||
int status;
|
||||
switch(errno) {
|
||||
case EACCES:
|
||||
case EPERM:
|
||||
|
@ -631,8 +631,6 @@ static int webdav_delete_dir(server *srv, connection *con, plugin_data *p, physi
|
|||
#ifdef USE_PROPPATCH
|
||||
sqlite3_stmt *stmt = p->conf.stmt_delete_uri;
|
||||
|
||||
status = 0;
|
||||
|
||||
if (stmt) {
|
||||
sqlite3_reset(stmt);
|
||||
|
||||
|
|
Loading…
Reference in New Issue