summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2010-05-20 20:25:48 -0700
committerDavid 'Digit' Turner <digit@google.com>2010-06-09 13:24:22 -0700
commit506b13d910a1a603b29fbc5a9ba41ba4c533b14c (patch)
treeb59be2855b5ebc4129d5c9e02dc1df4b9789c73d
parentb8e6c50cfa2d4c4b73e071d0e836a2667db010b1 (diff)
downloadbionic-506b13d910a1a603b29fbc5a9ba41ba4c533b14c.zip
bionic-506b13d910a1a603b29fbc5a9ba41ba4c533b14c.tar.gz
bionic-506b13d910a1a603b29fbc5a9ba41ba4c533b14c.tar.bz2
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
-rw-r--r--libc/include/stdlib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 41e8d26..5a991ac 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -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! */