SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
240 stars 90 forks source link

Compiler warnings when building hyperion #507

Closed imikec57 closed 1 year ago

imikec57 commented 1 year ago
  1. Compiler used: gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
  2. OS: RockyLinux9 (Linux-5.14.0-70.26.1.el9_0.x86_64 x86_64)
  3. Command to build: configure --enable-cckd-bzip2 --enable-het-bzip2 --enable-regina-rexx
  4. Version output:
    HHC01413I Hercules version 4.4.1.10647-SDL-gd0ccfbc9-modified
    HHC01414I (C) Copyright 1999-2022 by Roger Bowler, Jan Jaeger, and others
    HHC01417I ** The SoftDevLabs version of Hercules **
    HHC01415I Build date: Sep 30 2022 at 08:44:34
    HHC01417I Built with: GCC 11.2.1 20220127 (Red Hat 11.2.1-9)
    HHC01417I Build type: GNU/Linux x86_64 host architecture build
    HHC01417I Modes: S/370 ESA/390 z/Arch
    HHC01417I Max CPU Engines: 128
    HHC01417I Using   shared libraries
    HHC01417I Using   setresuid() for setting privileges
    HHC01417I Using   POSIX threads Threading Model
    HHC01417I Using   Error-Checking Mutex Locking Model
    HHC01417I With    Shared Devices support
    HHC01417I With    Dynamic loading support
    HHC01417I With    External GUI support
    HHC01417I With    IPV6 support
    HHC01417I With    HTTP Server support
    HHC01417I With    sqrtl support
    HHC01417I With    Signal handling
    HHC01417I With    Watchdog monitoring
    HHC01417I With    CCKD BZIP2 support
    HHC01417I With    HET BZIP2 support
    HHC01417I With    ZLIB support
    HHC01417I With    Regular Expressions support
    HHC01417I Without Object REXX support
    HHC01417I With    Regina REXX support
    HHC01417I With    Automatic Operator support
    HHC01417I Without National Language Support
    HHC01417I With    CCKD64 Support
    HHC01417I With    Transactional-Execution Facility support
    HHC01417I With    "Optimized" instructions
    HHC01417I With    OPTION_USE_SKAIP_AS_LOCK
    HHC01417I With    OPTION_SIE2BK_FLD_COPY
    HHC01417I Machine dependent assists: cmpxchg1 cmpxchg4 cmpxchg8 cmpxchg16 hatomics=C11
    HHC01417I Running on: RockyLinux9 (Linux-5.14.0-70.26.1.el9_0.x86_64 x86_64) MP=4
    HHC01417I Built with crypto external package version 1.0.0.50-geed8a86
    HHC01417I Built with decNumber external package version 3.68.0.100-g208ee4c
    HHC01417I Built with SoftFloat external package version 3.5.0.103-g9ba90c7
    HHC01417I Built with telnet external package version 1.0.0.60-g524b6e8
    

Warnings: See make.log attached:

Two main issues are: using uninitialized variable curtime in sl_fmtdate and trying to copy int into uint8_t in dasdload.c. The rest of the warnings are related to code not being properly aligned.

I did run hercules with fixes for these issues (VM/ESA, VSE/ESA, DOS/VS, VM/370, MVS, z/VM 5.3). I haven't encountered any problem or issue. My proposed solution should fix all warnings except one in dadload.c:

Fish-Git commented 1 year ago

@imikec57

The warnings you report were fixed quite some time ago in the develop branch, and will eventually be merged into the master branch whenever version 4.5 is eventually released (minor issues such as simple compiler warnings do not merit releasing a "Hot Fix" for the current release branch), so there is really nothing to fix since it has already been fixed.

Closing.

P.S. clang is preferred over gcc.