This is an automated email from the ASF dual-hosted git repository. aguettouche pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit d64929d736ba071d3ffd74bc8c7bdde9fd129f4e Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Wed Nov 18 13:26:11 2020 +0800 Fix nxstyle warning Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- examples/djoystick/djoy_main.c | 4 +++- examples/oneshot/oneshot_main.c | 11 ++++++----- examples/zerocross/zerocross_main.c | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/djoystick/djoy_main.c b/examples/djoystick/djoy_main.c index 5649dc1..41b494d 100644 --- a/examples/djoystick/djoy_main.c +++ b/examples/djoystick/djoy_main.c @@ -51,6 +51,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ #ifndef CONFIG_DJOYSTICK @@ -83,6 +84,7 @@ static void show_joystick(djoy_buttonset_t oldset, djoy_buttonset_t newset); /**************************************************************************** * Private Data ****************************************************************************/ + /* The set of supported joystick discretes */ static djoy_buttonset_t g_djoysupported; @@ -196,7 +198,7 @@ int main(int argc, FAR char *argv[]) /* Then loop, receiving signals indicating joystick events. */ - for (;;) + for (; ; ) { struct siginfo value; sigset_t set; diff --git a/examples/oneshot/oneshot_main.c b/examples/oneshot/oneshot_main.c index d5803fc..68b213a 100644 --- a/examples/oneshot/oneshot_main.c +++ b/examples/oneshot/oneshot_main.c @@ -90,10 +90,10 @@ static void show_usage(FAR const char *progname) fprintf(stderr, "USAGE: %s [-d <usecs>] [<devname>]\n", progname); fprintf(stderr, "Where:\n"); fprintf(stderr, "\t-d <usecs>:\n"); - fprintf(stderr, "\tSpecifies the oneshot delay in microseconds. Default %ld\n", - (unsigned long)CONFIG_EXAMPLES_ONESHOT_DELAY); + fprintf(stderr, "\tSpecifies the oneshot delay in microseconds." + " Default %ld\n", (unsigned long)CONFIG_EXAMPLES_ONESHOT_DELAY); fprintf(stderr, "\t<devname>:\n"); - fprintf(stderr, "\tSpecifies the path to the oneshot driver. Default %s\n", + fprintf(stderr, "\tSpecifies the path to the oneshot driver. Default %s\n", CONFIG_EXAMPLES_ONESHOT_DEVNAME); exit(EXIT_FAILURE); } @@ -149,7 +149,8 @@ int main(int argc, FAR char *argv[]) } else { - fprintf(stderr, "ERROR: Unsupported number of arguments: %d\n", argc); + fprintf(stderr, "ERROR: Unsupported number of arguments: %d\n", + argc); show_usage(argv[0]); } } @@ -244,7 +245,7 @@ int main(int argc, FAR char *argv[]) ret = ioctl(fd, OSIOC_START, (unsigned long)((uintptr_t)&start)); if (ret < 0) { - fprintf(stderr, "ERROR: Failed to start the oneshot interval: %d\n", + fprintf(stderr, "ERROR: Failed to start the oneshot: %d\n", errno); close(fd); return EXIT_FAILURE; diff --git a/examples/zerocross/zerocross_main.c b/examples/zerocross/zerocross_main.c index afe78cb..ca71631 100644 --- a/examples/zerocross/zerocross_main.c +++ b/examples/zerocross/zerocross_main.c @@ -51,6 +51,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ #ifndef CONFIG_SENSORS_ZEROCROSS