Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /tmp/select/src/board.c:50:9: warning: Access to field 'up' results in a dereference of a null pointer (loaded from variable 'p') [clang-analyzer-core.NullDereference]
- p->up = NULL;
- ^
- /tmp/select/src/board.c:9:17: note: Null pointer value stored to field 'right'
- start->right = calloc ( 1, sizeof ( struct item ) );
- ^
- /tmp/select/src/board.c:19:19: note: Assuming 'i' is >= 'w'
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:19:2: note: Loop condition is false. Execution continues on line 46
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:48:19: note: Assuming 'i' is < 'h'
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:48:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:51:3: note: Null pointer value stored to 'p'
- p = p->right;
- ^
- /tmp/select/src/board.c:48:19: note: Assuming 'i' is < 'h'
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:48:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:50:9: note: Access to field 'up' results in a dereference of a null pointer (loaded from variable 'p')
- p->up = NULL;
- ^
- /tmp/select/src/board.c:63:19: warning: statement should be inside braces [readability-braces-around-statements]
- if ( !p || !t ) break;
- ^
- /tmp/select/src/board.c:71:7: warning: Access to field 'down' results in a dereference of a null pointer (loaded from variable 'l') [clang-analyzer-core.NullDereference]
- l = l->down;
- ^
- /tmp/select/src/board.c:19:19: note: Assuming 'i' is < 'w'
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:19:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:23:21: note: Assuming 'ii' is < 'h'
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:23:3: note: Loop condition is true. Entering loop body
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:23:21: note: Assuming 'ii' is >= 'h'
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:23:3: note: Loop condition is false. Execution continues on line 38
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:19:19: note: Assuming 'i' is >= 'w'
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:19:2: note: Loop condition is false. Execution continues on line 46
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:48:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:48:2: note: Loop condition is false. Execution continues on line 54
- /tmp/select/src/board.c:56:2: note: Value assigned to 'l'
- l = start->right->down;
- ^
- /tmp/select/src/board.c:59:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < w ; i++ )
- ^
- /tmp/select/src/board.c:61:3: note: Loop condition is true. Entering loop body
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:63:9: note: Left side of '||' is false
- if ( !p || !t ) break;
- ^
- /tmp/select/src/board.c:63:15: note: Assuming 't' is null
- if ( !p || !t ) break;
- ^
- /tmp/select/src/board.c:63:4: note: Taking true branch
- if ( !p || !t ) break;
- ^
- /tmp/select/src/board.c:63:20: note: Execution continues on line 70
- if ( !p || !t ) break;
- ^
- /tmp/select/src/board.c:71:7: note: Access to field 'down' results in a dereference of a null pointer (loaded from variable 'l')
- l = l->down;
- ^
- /tmp/select/src/board.c:83:8: warning: Access to field 'right' results in a dereference of a null pointer (loaded from variable 'p') [clang-analyzer-core.NullDereference]
- p = p->right;
- ^
- /tmp/select/src/board.c:9:17: note: Null pointer value stored to field 'right'
- start->right = calloc ( 1, sizeof ( struct item ) );
- ^
- /tmp/select/src/board.c:19:19: note: Assuming 'i' is < 'w'
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:19:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:23:21: note: Assuming 'ii' is >= 'h'
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:23:3: note: Loop condition is false. Execution continues on line 38
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:19:19: note: Assuming 'i' is >= 'w'
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:19:2: note: Loop condition is false. Execution continues on line 46
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:48:2: note: Loop condition is false. Execution continues on line 54
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:59:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < w ; i++ )
- ^
- /tmp/select/src/board.c:61:3: note: Loop condition is false. Execution continues on line 70
- for ( int ii = 0; ii < h; ii ++ )
- ^
- /tmp/select/src/board.c:59:2: note: Loop condition is false. Execution continues on line 77
- for ( int i = 0; i < w ; i++ )
- ^
- /tmp/select/src/board.c:79:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:81:21: note: Assuming the condition is true
- for ( int ii = 0; ii < h-1; ii++ )
- ^
- /tmp/select/src/board.c:81:3: note: Loop condition is true. Entering loop body
- for ( int ii = 0; ii < h-1; ii++ )
- ^
- /tmp/select/src/board.c:83:4: note: Null pointer value stored to 'p'
- p = p->right;
- ^
- /tmp/select/src/board.c:81:3: note: Loop condition is true. Entering loop body
- for ( int ii = 0; ii < h-1; ii++ )
- ^
- /tmp/select/src/board.c:83:8: note: Access to field 'right' results in a dereference of a null pointer (loaded from variable 'p')
- p = p->right;
- ^
- /tmp/select/src/board.c:99:11: warning: Access to field 'down' results in a dereference of a null pointer (loaded from variable 'p') [clang-analyzer-core.NullDereference]
- p->down = NULL;
- ^
- /tmp/select/src/board.c:19:19: note: Assuming 'i' is >= 'w'
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:19:2: note: Loop condition is false. Execution continues on line 46
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:48:19: note: Assuming 'i' is < 'h'
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:48:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:50:3: note: Null pointer value stored to field 'up'
- p->up = NULL;
- ^
- /tmp/select/src/board.c:48:19: note: Assuming 'i' is >= 'h'
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:48:2: note: Loop condition is false. Execution continues on line 54
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:59:2: note: Loop condition is false. Execution continues on line 77
- for ( int i = 0; i < w ; i++ )
- ^
- /tmp/select/src/board.c:79:2: note: Loop condition is false. Execution continues on line 91
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:92:2: note: Loop condition is false. Execution continues on line 96
- for ( int i = 0; i < w; i++ )
- ^
- /tmp/select/src/board.c:96:2: note: Null pointer value stored to 'p'
- p = p->up;
- ^
- /tmp/select/src/board.c:97:2: note: Loop condition is true. Entering loop body
- for ( int i = 0; i < h; i++ )
- ^
- /tmp/select/src/board.c:99:11: note: Access to field 'down' results in a dereference of a null pointer (loaded from variable 'p')
- p->down = NULL;
- ^
- /tmp/select/src/main.c:6:16: warning: parameter 'argc' is unused [misc-unused-parameters]
- int main ( int argc, char *argv[] )
- ^~~~~
- /*argc*/
- /tmp/select/src/main.c:6:28: warning: parameter 'argv' is unused [misc-unused-parameters]
- int main ( int argc, char *argv[] )
- ^~~~~~
- /*argv*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement