In my source code (in C), there is a line as below:
char line[1000] = "";
fgets(line, sizeof(line), file)
When I use parasoft to check, I receive two error:
In 'fgets' function call, do not pass long casted to int expression as '2' function argument
The type 'unsigned long' of function argument number '2' does not match declared type 'int'
I find nothing wrong with these lines in source code, so I don't know how to fix these error. Could you please give me a suggestion?