You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/15 01:49:28 UTC
[incubator-nuttx-apps] 03/05: examples/fboverlay/fboverlay_main.c:
Fix printf format warnings
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit fa727e08f199141673b1b768bcc904cdd9e965d4
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 14 08:48:38 2020 +0900
examples/fboverlay/fboverlay_main.c: Fix printf format warnings
---
examples/fboverlay/fboverlay_main.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/examples/fboverlay/fboverlay_main.c b/examples/fboverlay/fboverlay_main.c
index a3fbf8d..35ac372 100644
--- a/examples/fboverlay/fboverlay_main.c
+++ b/examples/fboverlay/fboverlay_main.c
@@ -37,6 +37,7 @@
* Included Files
****************************************************************************/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -427,12 +428,12 @@ static void print_plane_info(int fb)
printf("PlaneInfo:\n"
" fbmem: %p\n"
- " fblen: %lu\n"
+ " fblen: %zu\n"
" stride: %u\n"
" display: %u\n"
" bpp: %u\n"
" fbmem: %p\n",
- pinfo.fbmem, (unsigned long)pinfo.fblen, pinfo.stride,
+ pinfo.fbmem, pinfo.fblen, pinfo.stride,
pinfo.display,
pinfo.bpp, fbmem);
}
@@ -484,7 +485,7 @@ static void print_overlay_info(int fb, uint8_t overlayno)
printf("OverlayInfo:\n"
" fbmem: %p\n"
- " fblen: %lu\n"
+ " fblen: %zu\n"
" stride: %u\n"
" overlay: %u\n"
" bpp: %u\n"
@@ -495,7 +496,7 @@ static void print_overlay_info(int fb, uint8_t overlayno)
" mode: %08x\n"
" accl: %08" PRIx32 "\n"
" mmap: %p\n",
- oinfo.fbmem, (unsigned long)oinfo.fblen, oinfo.stride,
+ oinfo.fbmem, oinfo.fblen, oinfo.stride,
oinfo.overlay,
oinfo.bpp, oinfo.blank, oinfo.chromakey, oinfo.color,
oinfo.transp.transp, oinfo.transp.transp_mode, oinfo.accl, fbmem);
@@ -560,8 +561,8 @@ static int overlay_fill(int fb, uint8_t overlayno, uint32_t color,
if (offset > oinfo.fblen)
{
- fprintf(stderr, "Area is out of range: %d >= %d\n", offset,
- oinfo.fblen);
+ fprintf(stderr, "Area is out of range: %" PRId32 " >= %zu\n",
+ offset, oinfo.fblen);
return -1;
}