From 6028ad6e21fb273eb0aa5bb5bcb9d9a765a75db3 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 6 Dec 2013 17:36:12 +0100 Subject: [PATCH] kinect_upload_fw/endian.c: fix warning and rename a function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Remove the bigend() function, it is never used and causes a compiler warning: endian.c:10:12: warning: ‘bigend’ defined but not used [-Wunused-function] static int bigend(void) { Also rename the litend() function to little_endian(), there is no need to use a short name in this case. --- kinect_upload_fw/endian.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kinect_upload_fw/endian.c b/kinect_upload_fw/endian.c index 89120ca..24c5ccf 100644 --- a/kinect_upload_fw/endian.c +++ b/kinect_upload_fw/endian.c @@ -1,16 +1,12 @@ #include #include -static int litend(void) { +static int little_endian(void) { int i = 0; ((char *) (&i))[0] = 1; return (i == 1); } -static int bigend(void) { - return !litend(); -} - int main(void) { printf("#ifndef __ENDIAN_H\n"); printf("#define __ENDIAN_H\n"); @@ -18,7 +14,7 @@ int main(void) { printf("#define __LITTLE_ENDIAN 1234\n"); printf("#define __BIG_ENDIAN 4321\n"); printf("#define __BYTE_ORDER __%s_ENDIAN\n", - litend() ? "LITTLE" : "BIG"); + little_endian() ? "LITTLE" : "BIG"); printf("\n"); printf("#endif /* __ENDIAN_H */\n"); exit(0); -- 2.1.4