Re: [PATCH v2 3/3] main_edit.c: Fix Unchecked return value (CID #1255318)

2021-03-01 Thread Gedare Bloom
On Mon, Mar 1, 2021 at 11:47 AM Ryan Long  wrote:
>
> CID 1255318: Unchecked return value in display_line().
>
> Updates #4257
> ---
>  cpukit/libmisc/shell/main_edit.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/cpukit/libmisc/shell/main_edit.c 
> b/cpukit/libmisc/shell/main_edit.c
> index a011049..9819a94 100644
> --- a/cpukit/libmisc/shell/main_edit.c
> +++ b/cpukit/libmisc/shell/main_edit.c
> @@ -1089,7 +1089,11 @@ static void display_line(struct editor *ed, int pos, 
> int fullline) {
>int selstart, selend, ch;
>char *s;
>
> -  get_selection(ed, , );
> +  #ifdef __rtems__
> +(void) get_selection(ed, , );
> +  #else
> +get_selection(ed, , );
> +  #endif

I think we have made changes to this file, that forked it from its
upstream. We can get rid of this #ifdef ... #endif construct.

>while (col < maxcol) {
>  if (margin == 0) {
>if (!hilite && pos >= selstart && pos < selend) {
> --
> 1.8.3.1
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 3/3] main_edit.c: Fix Unchecked return value (CID #1255318)

2021-03-01 Thread Ryan Long
CID 1255318: Unchecked return value in display_line().

Updates #4257
---
 cpukit/libmisc/shell/main_edit.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cpukit/libmisc/shell/main_edit.c b/cpukit/libmisc/shell/main_edit.c
index a011049..9819a94 100644
--- a/cpukit/libmisc/shell/main_edit.c
+++ b/cpukit/libmisc/shell/main_edit.c
@@ -1089,7 +1089,11 @@ static void display_line(struct editor *ed, int pos, int 
fullline) {
   int selstart, selend, ch;
   char *s;
 
-  get_selection(ed, , );
+  #ifdef __rtems__
+(void) get_selection(ed, , );
+  #else
+get_selection(ed, , );
+  #endif
   while (col < maxcol) {
 if (margin == 0) {
   if (!hilite && pos >= selstart && pos < selend) {
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel