• Static code analysis

    From Michael Dukelsky@2:5020/1042 to All on Mon Feb 15 18:26:44 2021
    Hello All,

    I've started using static code analysis for improving the code. At the moment I've applied the static analysis to huskylib and smapi and pushed the results to the master branch. I tested compilation in Windows using Visual Studio 2019 and in linux using gcc 10.2.1. Please check whether it compiles in OS/2.

    PVS-Studio was used for static analysis of the projects. https://www.viva64.com/en/pvs-studio/

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Tommi Koivula@2:221/1 to Michael Dukelsky on Tue Feb 16 21:23:10 2021

    15 Feb 21 18:26, Michael Dukelsky wrote to All:

    Please check whether it compiles in OS/2.

    No problems.

    'Tommi

    ---
    * Origin: rbb.fidonet.fi (2:221/1)
  • From Michael Dukelsky@2:5020/1042 to Michael Pierce on Wed Feb 17 09:36:22 2021
    Hello Michael,

    Tuesday February 16 2021, Michael Pierce wrote to Michael Dukelsky:

    I've started using static code analysis for improving the code.
    At the moment I've applied the static analysis to huskylib and
    smapi and pushed the results to the master branch. I tested
    compilation in Windows using Visual Studio 2019 and in linux
    using gcc 10.2.1. Please check whether it compiles in OS/2.

    when you say master branch, where do you mean??

    I mean master branch in the repository.

    $ git status
    On branch master
    ^^^^^^^^^^^^^ This is the branch in my local repository which I cloned
    from github.
    Your branch is up to date with 'origin/master'.
    ^^^^^^^^^^^^^
    And this is the same branch in the remote repository on
    github.

    I did development in a separate temporary branch. After finishing I merged the temporary branch with the master branch, so that all the made changes are now in the master branch. And then I deleted the temporary branch.

    I got the following to compile:
    https://github.com/zoomosis/huskylib
    https://github.com/zoomosis/smapi
    https://github.com/zoomosis/fidoconf
    https://github.com/zoomosis/areafix

    but hpt did not
    here is the output of wmake

    Open Watcom Make Version 2.0beta1 Limited Availability
    Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
    Source code is available under the Sybase Open Watcom Public License.
    See http://www.openwatcom.org/ for details.
    wcl386 -zq -bt=os2v2 -l=os2v2 -I..\h -I..\..\huskylib -I..\..\fidoconf -I..\..\smapi -I..\..\areafix -Fe=pktinfo.exe ..\src\pktinfo.c ..\src\dupe.c ..\src\pktread.c ..\src\fcommon.c ..\src\global.c ..\..\huskylib\make\huskywco.lib ..\..\fidoconf\make\fconfwco.lib ..\..\smapi\make\smapiwco.lib ..\..\areafix\make\afixwco.lib Error! E2028: gettimeofday_ is an
    undefined reference file ..\..\huskylib\make\huskywco.lib(C:\home\src\husky\huskylib\src\tdelay .c): undefined symbol gettimeofday_
    Error: Linker returned a bad status

    gettimeofday should be in libc. Maybe OS/2 users may help you.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Oli@2:280/464.47 to Michael Pierce on Wed Feb 17 08:21:19 2021
    Michael wrote (2021-02-16):

    Hello Michael!

    15 Feb 21 18:26, you wrote to all:

    Hello All,

    I've started using static code analysis for improving the code. At
    the moment I've applied the static analysis to huskylib and smapi
    and pushed the results to the master branch. I tested compilation in
    Windows using Visual Studio 2019 and in linux using gcc 10.2.1.
    Please check whether it compiles in OS/2.

    when you say master branch, where do you mean??

    I got the following to compile:
    https://github.com/zoomosis/huskylib
    https://github.com/zoomosis/smapi
    https://github.com/zoomosis/fidoconf
    https://github.com/zoomosis/areafix

    this is andrew's fork, which is slightly behind the official repo and has not included the static code analysis commits (yet). The official huskyproject repo is at (I guess it doesn't include the commits for watcom):

    https://github.com/huskyproject/huskylib
    https://github.com/huskyproject/smapi
    ....

    ---
    * Origin: . (2:280/464.47)
  • From Michael Dukelsky@2:5020/1042 to andrew clarke on Wed Feb 17 13:02:26 2021
    Hello andrew,

    Wednesday February 17 2021, andrew clarke wrote to Michael Pierce:

    I got the following to compile:
    https://github.com/zoomosis/huskylib
    https://github.com/zoomosis/smapi
    https://github.com/zoomosis/fidoconf
    https://github.com/zoomosis/areafix

    This is my fork.

    I did not pay attention to what was written after github.com/ :-(

    Michael Dukelsky is working on the mainline Husky
    repo. I haven't included his latest patches in my fork and would
    prefer my Watcom patches be merged into the mainline Husky code which
    will make my fork redundant.

    Please make pull requests, I'll merge them.

    Michael


    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From andrew clarke@3:633/267 to Michael Dukelsky on Wed Feb 17 22:03:14 2021
    On Wed 2021-02-17 13:02:26, Michael Dukelsky (2:5020/1042) wrote to andrew clarke:

    This is my fork.

    I did not pay attention to what was written after github.com/ :-(

    :-)

    Michael Dukelsky is working on the mainline Husky
    repo. I haven't included his latest patches in my fork and would
    prefer my Watcom patches be merged into the mainline Husky code
    which will make my fork redundant.

    Please make pull requests, I'll merge them.

    OK, pull requests coming soon. Thank you.

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From andrew clarke@3:633/267 to Michael Pierce on Thu Feb 18 11:45:18 2021
    On 2021-02-17 14:14:36, Michael Pierce (1:105/81) wrote to andrew clarke:

    Thought I'd pass along status and also importantly what it took to get
    to this point

    first, I was using what I thought was curren version of open-watcom from sourceforge.net - found more recent version from github, applied
    that got the exact same error - so uninstalled, reboot, re-install, re-compile, still got same error - had to uninstall, reboot, tried to delete c:\watcom folder and all subfolders - got error - turns out had
    to unlock nmpbind.exe (in c:\watcom\binp) did that, deleted folder, rebooted, re-installed, rebooted, recompiled, this time everything compiled

    I do hope who ever is working on open-watcom is reading this.. so they
    can fix that problem

    The OS/2 installer probably has NMPBIND.EXE loading from CONFIG.SYS, which then runs in the background. You don't actually need NMPBIND.EXE running for the compiler to work though.

    I prefer to untar ow-snapshot.tar.gz to D:\WATCOM without running the installer, so my CONFIG.SYS stays unmodified.

    I have an OS/2 .cmd file that sets the minimum envvars that wcl386 needs:

    set WATCOM=d:\watcom
    set PATH=%WATCOM%\binp;%PATH%
    set BEGINLIBPATH=%WATCOM%\binp\dll;%BEGINLIBPATH%
    set INCLUDE=%WATCOM%\h;%WATCOM%\h\os2

    still not out of the woods yet though - now getting a different error

    hpt toss scan pack
    SMAPI ERROR: wrongly sized subfield occured!

    any ideas?

    Not good. Possibly a corrupt JAM base?

    I wouldn't expect the OW2.0 port to have caused it, but hasn't been tested much, so beware.

    structrw.c- if(pbuf + JAM_SF_HEADER_SIZE + size > limit)
    structrw.c- /* it means that subfield claims to be longer
    structrw.c- than header says. can't be. */
    structrw.c- {
    structrw.c- /* just break, ideally there shall be a setting for lax treatment of messagebase */
    structrw.c: printf("SMAPI ERROR: wrongly sized subfield occured!\n");
    structrw.c- break;
    structrw.c- }

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Michael Dukelsky@2:5020/1042 to andrew clarke on Thu Feb 18 12:39:58 2021
    Hello andrew,

    Wednesday February 17 2021, andrew clarke wrote to Michael Dukelsky:

    Michael Dukelsky is working on the mainline Husky
    repo. I haven't included his latest patches in my fork and would
    prefer my Watcom patches be merged into the mainline Husky code
    which will make my fork redundant.

    Please make pull requests, I'll merge them.

    OK, pull requests coming soon. Thank you.

    I merged your pull requests for huskylib, smapi, fidoconf, areafix and hpt. Thank you for the good job.

    It would be nice to add htick and maybe msged.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From andrew clarke@3:633/267 to Michael Dukelsky on Thu Feb 18 22:27:14 2021
    On 2021-02-18 12:39:58, Michael Dukelsky (2:5020/1042) wrote to andrew clarke:

    I merged your pull requests for huskylib, smapi, fidoconf, areafix and hpt. Thank you for the good job.

    You're welcome. :)

    It would be nice to add htick and maybe msged.

    I think so too.

    PS. My changes to README.md for some of the above modules refer to the OW2.0 fork, so you should revert those changes to avoid confusion.

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)