[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [mini-os master] lib/sys.c: enclose file_types in define guards



commit 1a3ee6eeca136525aa2e6917ae500e7cf731c09d
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri May 13 15:21:10 2016 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri May 13 17:03:18 2016 +0100

    lib/sys.c: enclose file_types in define guards
    
    Otherwise some build environments complain file_types array is defined
    but not used.
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 lib/sys.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/sys.c b/lib/sys.c
index f8d7a7c..1420722 100644
--- a/lib/sys.c
+++ b/lib/sys.c
@@ -634,6 +634,7 @@ int closedir(DIR *dir)
 
 /* We assume that only the main thread calls select(). */
 
+#if defined(LIBC_DEBUG) || defined(LIBC_VERBOSE)
 static const char file_types[] = {
     [FTYPE_NONE]       = 'N',
     [FTYPE_CONSOLE]    = 'C',
@@ -646,6 +647,7 @@ static const char file_types[] = {
     [FTYPE_KBD]                = 'K',
     [FTYPE_FB]         = 'G',
 };
+#endif
 #ifdef LIBC_DEBUG
 static void dump_set(int nfds, fd_set *readfds, fd_set *writefds, fd_set 
*exceptfds, struct timeval *timeout)
 {
--
generated by git-patchbot for /home/xen/git/mini-os.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.