[CinCV TNG] [PATCH] Removed unused renderfarmfsserver.inc

Einar Rünkaru einarrunkaru at gmail.com
Thu Aug 10 19:51:06 CEST 2017



On 08/09/2017 11:55 AM, Einar Rünkaru wrote:
> 
> 
> On 8 August 2017 at 23:57, Johannes Sixt <j6t at kdbg.org 
> <mailto:j6t at kdbg.org>> wrote:
> 
>     I am not very happy with the sequence of the patches:
> 
>     Am 08.08.2017 um 18:47 schrieb Einar Rünkaru:
> 
>         Subject: [PATCH] Removed unused renderfarmfsserver.inc
> 
>         Drop support of VFS
>         ---
>            cinelerra/filelist.C             | 14 ++------------
>            cinelerra/renderfarm.C           |  4 ----
>            cinelerra/renderfarm.h           |  1 -
>            cinelerra/renderfarmfsserver.inc | 31
>         -------------------------------
>            4 files changed, 2 insertions(+), 48 deletions(-)
>            delete mode 100644 cinelerra/renderfarmfsserver.inc
> 
>         diff --git a/cinelerra/filelist.C b/cinelerra/filelist.C
>         index 2480350..7b317c6 100644
>         --- a/cinelerra/filelist.C
>         +++ b/cinelerra/filelist.C
>         @@ -28,7 +28,6 @@
>            #include "mutex.h"
>            #include "mwindow.inc"
>            #include "render.h"
>         -#include "renderfarmfsserver.inc"
>            #include "vframe.h"
>            #include "mainerror.h"
>            @@ -196,11 +195,7 @@ int FileList::write_list_header()
>                  for(int i = 0; i < path_list.total; i++)
>                  {
>         -// Fix path for VFS but leave leading slash
>         -               if(!strncmp(path_list.values[i],
>         RENDERFARM_FS_PREFIX, strlen(RENDERFARM_FS_PREFIX)))
>         -                       sprintf(string, "%s\n",
>         path_list.values[i] + strlen(RENDERFARM_FS_PREFIX));
>         -               else
>         -                       sprintf(string, "%s\n",
>         path_list.values[i]);
>         +               sprintf(string, "%s\n", path_list.values[i]);
>                          fwrite(string, strlen(string), 1, stream);
>                  }
>                  fclose(stream);
>         @@ -290,12 +285,7 @@ int FileList::read_frame(VFrame *frame)
>                          }
>                          FILE *in;
>            -
>         -// Fix path for VFS
>         -               if(!strncmp(asset->path, RENDERFARM_FS_PREFIX,
>         strlen(RENDERFARM_FS_PREFIX)))
>         -                       sprintf(string, "%s%s",
>         RENDERFARM_FS_PREFIX, path);
>         -               else
>         -                       strcpy(string, path);
>         +               strcpy(string, path);
>                          if(!(in = fopen(string, "rb")))
>                          {
> 
> 
>     The patch text up to here should be the first commit.
> 
>     The remaining part should be included in the subsequent commit
>     "Remove completely unused files"
> 
> 
> We have a bit different opinions. My focus is on 'completely unused 
> text' - the text what exists, and what even never compiled or what 
> compiled, but never referenced. Headers are 'completely unused' when 
> anything in header is not used - you can remove 'include' and nothing 
> needs to change in the rest. If copilation does not fail, you can be 
> sure, that no new bugs created.
> 
> Simply 'unused code' is code that is compiled, but never activated. 
> Removing 'unused code' is a bit more risky, because the change may 
> create a new bug.
> 

Patch applied.

Thanks,
Einar


More information about the Cinelerra mailing list