summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/examples/poll/select_listener.c2
-rw-r--r--apps/system/vi/vi.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/apps/examples/poll/select_listener.c b/apps/examples/poll/select_listener.c
index 9e35f0864..65e6b6a72 100644
--- a/apps/examples/poll/select_listener.c
+++ b/apps/examples/poll/select_listener.c
@@ -173,7 +173,7 @@ void *select_listener(pthread_addr_t pvarg)
}
buffer[nbytes] = '\0';
- printf("select_listener: Read '%s' (%d bytes)\n", buffer, nbytes);
+ printf("select_listener: Read '%s' (%ld bytes)\n", buffer, (long)nbytes);
}
timeout = false;
diff --git a/apps/system/vi/vi.c b/apps/system/vi/vi.c
index c2524f887..6289ee219 100644
--- a/apps/system/vi/vi.c
+++ b/apps/system/vi/vi.c
@@ -1230,6 +1230,7 @@ static bool vi_savetext(FAR struct vi_s *vi, FAR const char *filename,
/* Report the error (or partial write). EINTR is not handled. */
vi_error(vi, g_fmtcmdfail, "fwrite", errno);
+ (void)fclose(stream);
return false;
}