[ROSAPPS][PICE] Fix ROSAPPS-355 Unreachable code
authorJoachim Henze <Joachim.Henze@reactos.org>
Mon, 30 Mar 2020 15:18:16 +0000 (17:18 +0200)
committerJoachim Henze <Joachim.Henze@reactos.org>
Mon, 30 Mar 2020 15:18:16 +0000 (17:18 +0200)
Just to satisfy static code analysis. No change in behavior expected.

The same way as the external applications maintainers
fixed it in their latest version
https://sourceforge.net/projects/pice/files/pICE%20source/build_20/

By killing the whole function ScrollUp() with the disabled code.
Like the original authors I left the functions unused declaration
existing within hardware.h

modules/rosapps/applications/sysutils/utils/pice/module/hardware.c

index 65864a0..7d49b79 100644 (file)
@@ -664,27 +664,6 @@ void ClrLine(ULONG line)
     ohandlers.ClrLine(line);
 }
 
-//*************************************************************************
-// ScrollUp()
-//
-// Scroll a specific window up one line
-//*************************************************************************
-void ScrollUp(USHORT Window)
-{
-    USHORT i;
-
-    return;
-
-       if(!wWindow[Window].bScrollDisabled)
-       {
-               for(i=1;i<wWindow[Window].cy;i++)
-               {
-                       CopyLineTo((USHORT)(wWindow[Window].y+i-1),(USHORT)(wWindow[Window].y+i));
-               }
-               ClrLine((USHORT)(wWindow[Window].y+wWindow[Window].cy-1));
-       }
-}
-
 //*************************************************************************
 // Home()
 //
@@ -848,7 +827,6 @@ void Print(USHORT Window,LPSTR p)
                                if(wWindow[Window].usCurY>=wWindow[Window].cy)
                                {
                                        wWindow[Window].usCurY=wWindow[Window].cy-1;
-                                       ScrollUp(Window);
                                }
                 if(wWindow[Window].bScrollDisabled==TRUE)break;
                        }