Remove a gcc-4.5 compilation warning:
bionic/libc/include/../include/stdlib.h: In function 'int grantpt(int)': bionic/libc/include/../include/stdlib.h:138:23: warning: parameter '__fd' set but not used [-Wunused-but-set-parameter] By adding __attribute((unused)) to __fd, the warning is gone, and this attribute is compatible with gcc-4.4.0, gcc-4.3.1 gcc-4.2.1. There is no any side effect. Change-Id: I385f0f4da1013ffd1499e391eac9123aafe1f7a5
This commit is contained in:
parent
b8e6c50cfa
commit
506b13d910
|
@ -135,7 +135,7 @@ extern char* ptsname(int);
|
|||
extern int ptsname_r(int, char*, size_t);
|
||||
extern int getpt(void);
|
||||
|
||||
static __inline__ int grantpt(int __fd)
|
||||
static __inline__ int grantpt(int __fd __attribute((unused)))
|
||||
{
|
||||
(void)__fd;
|
||||
return 0; /* devpts does this all for us! */
|
||||
|
|
Loading…
Reference in New Issue