The type of an actual argument does not match the corresponding formal parameter at a subroutine call.
Specifically, this error occurs when the actual argument is not a pointer but the formal parameter is a pointer. This error is caught for subroutines like scanf that expect to receive arguments of type pointer in the variable part of the argument list.
ID |
Observation |
Description |
---|---|---|
1 |
Call site |
The actual argument that was passed |
#include <stdio.h> int main(int argc, char **argv) { int a = 1; scanf("%d", a); // bad: should be scanf("%d", &a); printf("%d\n", a); }
Copyright © 2010, Intel Corporation. All rights reserved.