summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-20 16:44:08 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-20 16:44:08 -0600
commit2e2041e927311193518490911aae5b6d6d58f27f (patch)
treecf90aeb897a383cacc80cbc3a91f6ee0620a4f8a
parentef341c3dd329282a2d15b6d2c2397841d58ff5cc (diff)
downloadnuttx-2e2041e927311193518490911aae5b6d6d58f27f.tar.gz
nuttx-2e2041e927311193518490911aae5b6d6d58f27f.tar.bz2
nuttx-2e2041e927311193518490911aae5b6d6d58f27f.zip
Remove warnings when CONFIG_NXTK_BORDERWIDTH is set to zero. From Pierre-Noel Bouteville
-rw-r--r--nuttx/libnx/nxtk/nxtk_drawframe.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/nuttx/libnx/nxtk/nxtk_drawframe.c b/nuttx/libnx/nxtk/nxtk_drawframe.c
index 74b23453e..ae0be6442 100644
--- a/nuttx/libnx/nxtk/nxtk_drawframe.c
+++ b/nuttx/libnx/nxtk/nxtk_drawframe.c
@@ -73,6 +73,7 @@
* Name: nxtk_drawframeside
****************************************************************************/
+#if CONFIG_NXTK_BORDERWIDTH > 0
static void nxtk_drawframeside(FAR struct nxtk_framedwindow_s *fwnd,
FAR const struct nxgl_rect_s *side,
FAR const struct nxgl_rect_s *bounds,
@@ -85,6 +86,7 @@ static void nxtk_drawframeside(FAR struct nxtk_framedwindow_s *fwnd,
nx_fill((NXWINDOW)fwnd, &intersection, color);
}
}
+#endif
/****************************************************************************
* Public Functions
@@ -110,10 +112,14 @@ static void nxtk_drawframeside(FAR struct nxtk_framedwindow_s *fwnd,
int nxtk_drawframe(FAR struct nxtk_framedwindow_s *fwnd,
FAR const struct nxgl_rect_s *bounds)
{
+#if CONFIG_NXTK_BORDERWIDTH > 0
struct nxgl_rect_s frame;
+#endif
struct nxgl_size_s wndsize;
struct nxgl_size_s tbsize;
+#if CONFIG_NXTK_BORDERWIDTH > 0
nxgl_coord_t thickness;
+#endif
/* Shiny edge:
* Thickness: 1
@@ -133,7 +139,7 @@ int nxtk_drawframe(FAR struct nxtk_framedwindow_s *fwnd,
thickness = CONFIG_NXTK_BORDERWIDTH - 2;
#elif CONFIG_NXTK_BORDERWIDTH > 1
thickness = CONFIG_NXTK_BORDERWIDTH - 1;
-#else
+#elif CONFIG_NXTK_BORDERWIDTH > 0
thickness = CONFIG_NXTK_BORDERWIDTH;
#endif