problem:
---------------------
ts_calibrate.c: In function ‘main’:
ts_calibrate.c:234: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
In file included from /usr/include/fcntl.h:205,
from /usr/include/sys/fcntl.h:1,
from ts_calibrate.c:20:
In function ‘open’,
inlined from ‘main’ at ts_calibrate.c:227:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
In function ‘open’,
inlined from ‘main’ at ts_calibrate.c:229:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[2]: *** [ts_calibrate.o] Error 1
make[2]: Leaving directory `/root/Qt_Tools/tslib/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Qt_Tools/tslib'
make: *** [all] Error 2
[email protected]:/root/Qt_Tools/tslib
---------------------------------------------
solution:
root@xx-desktop:~/Qt_Tools/tslib# gedit ./tests/ts_calibrate.c&
go to line227 &&line 229,
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
cal_fd = open (calfile, O_CREAT | O_RDWR,0777));
} else {
cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR,0777));
}
Because GCC strict syntax error checking.When using then OPEN function,the 2th parameter using "O_CREAT",you must add the 3th parameter ---0777.