<div dir="ltr">Patches 2, 3, 4, 5 are:<br><br>Reviewed-by: Jasper St. Pierre <<a href="mailto:jstpierre@mecheye.net" target="_blank">jstpierre@mecheye.net</a>><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jan 7, 2014 at 7:02 PM, Alan Coopersmith <span dir="ltr"><<a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since we build with -export-symbols-regex '^FS.*', it wasn't available<br>
to callers outside libFS, and was never called by anything inside libFS.<br>
<br>
Xtrans provides it's own exact copy of this function, which gets<br>
the name _FSTransGetHostname when built in libFS, nothing in libFS<br>
outside the Xtrans code calls a gethostname() function.<br>
<br>
Flagged by cppcheck 1.62:<br>
[FSlibInt.c:1060]: (style) The function '_FSGetHostname' is never used.<br>
<br>
Signed-off-by: Alan Coopersmith <<a href="mailto:alan.coopersmith@oracle.com">alan.coopersmith@oracle.com</a>><br>
---<br>
src/FSlibInt.c | 51 ---------------------------------------------------<br>
src/FSlibint.h | 1 -<br>
2 files changed, 52 deletions(-)<br>
<br>
diff --git a/src/FSlibInt.c b/src/FSlibInt.c<br>
index cb53e44..cd996d1 100644<br>
--- a/src/FSlibInt.c<br>
+++ b/src/FSlibInt.c<br>
@@ -1034,57 +1034,6 @@ _FSFreeQ(void)<br>
return;<br>
}<br>
<br>
-#ifdef _POSIX_SOURCE /* stupid makedepend [need if] */<br>
-#ifndef __QNX__ /* QNX's uname nodename entry is not same as tcpip hostname */<br>
-#define NEED_UTSNAME<br>
-#endif<br>
-#endif<br>
-#ifdef hpux<br>
-#define NEED_UTSNAME<br>
-#endif<br>
-#ifdef SVR4<br>
-#ifndef _SEQUENT_<br>
-#define NEED_UTSNAME<br>
-#endif<br>
-#endif<br>
-<br>
-#ifdef NEED_UTSNAME<br>
-#include <sys/utsname.h><br>
-#endif<br>
-<br>
-<br>
-/*<br>
- * _FSGetHostname - similar to gethostname but allows special processing.<br>
- */<br>
-int<br>
-_FSGetHostname(<br>
- char *buf,<br>
- int maxlen)<br>
-{<br>
- int len;<br>
-<br>
-#ifdef NEED_UTSNAME<br>
- /*<br>
- * same host name crock as in server and xinit.<br>
- */<br>
- struct utsname name;<br>
-<br>
- uname(&name);<br>
- len = strlen(name.nodename);<br>
- if (len >= maxlen)<br>
- len = maxlen - 1;<br>
- strncpy(buf, name.nodename, len);<br>
- buf[len] = '\0';<br>
-#else<br>
- buf[0] = '\0';<br>
- (void) gethostname(buf, maxlen);<br>
- buf[maxlen - 1] = '\0';<br>
- len = strlen(buf);<br>
-#endif /* NEED_UTSNAME */<br>
-<br>
- return len;<br>
-}<br>
-<br>
#ifndef _FSANYSET<br>
/*<br>
* This is not always a macro.<br>
diff --git a/src/FSlibint.h b/src/FSlibint.h<br>
index 60a2ce6..7669778 100644<br>
--- a/src/FSlibint.h<br>
+++ b/src/FSlibint.h<br>
@@ -95,7 +95,6 @@ extern int _FSPrintDefaultError ( FSServer *svr, FSErrorEvent *event,<br>
extern int _FSDefaultError ( FSServer *svr, FSErrorEvent *event );<br>
extern char * _FSAllocScratch ( FSServer *svr, unsigned long nbytes );<br>
extern void _FSFreeQ ( void );<br>
-extern int _FSGetHostname ( char *buf, int maxlen );<br>
<br>
extern FSErrorHandler FSSetErrorHandler ( FSErrorHandler handler );<br>
extern FSIOErrorHandler FSSetIOErrorHandler ( FSIOErrorHandler handler );<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.2<br>
<br>
_______________________________________________<br>
<a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>
Archives: <a href="http://lists.x.org/archives/xorg-devel" target="_blank">http://lists.x.org/archives/xorg-devel</a><br>
Info: <a href="http://lists.x.org/mailman/listinfo/xorg-devel" target="_blank">http://lists.x.org/mailman/listinfo/xorg-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br> Jasper<br>
</div>