nuttx-apps/system/nxplayer
Xiang Xiao 65a02ba9f9 system/nxplayer: Fix the compiler warning
nxplayer.c: In function 'nxplayer_playinternal':
Error: nxplayer.c:209:36: error: '%s' directive output may be truncated writing up to 99 bytes into a region of size 59 [-Werror=format-truncation=]
  209 |   snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
      |                                    ^~                    ~~~~~~
nxplayer.c:209:3: note: 'snprintf' output between 19 and 118 bytes into a destination of size 64
  209 |   snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:1809:42: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
 1809 |       snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
      |                                          ^
nxplayer.c:1809:7: note: 'snprintf' output 2 or more bytes (assuming 129) into a destination of size 128
 1809 |       snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:359:53: error: '%s' directive output may be truncated writing up to 128 bytes into a region of size 53 [-Werror=format-truncation=]
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |                                                     ^~
nxplayer.c:359:11: note: 'snprintf' output between 12 and 140 bytes into a destination of size 64
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 00:58:19 +08:00
..
Kconfig nxplayer & nxrecorder: make main thread configurable, set to default 2020-11-03 21:45:59 -08:00
Make.defs Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00
Makefile Makefile: Ken Pettit: update licenses to Apache 2021-06-07 21:35:33 -05:00
nxplayer_main.c system: update licenses to Apache 2021-06-11 02:42:05 -05:00
nxplayer.c system/nxplayer: Fix the compiler warning 2022-03-07 00:58:19 +08:00
README.md Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00

System / nxplayer NXPlayer

Author: Ken Pettit
  Date: 11 Sept 2013

This application implements a command-line media player which uses the NuttX Audio system to play files (mp3, wav, etc.) from the file system.

Usage:

nxplayer

The application presents an command line for specifying player commands, such as play filename, pause, volume 50%, etc.