Hello Sean!
03 Sep 26 22:04, you wrote to me:
Vincent Coen wrote to Nick Boel:
Downloaded copied old mygolded.h to folder ran dist-gpl.sh and
that prduces lots of warnings and errors
Whenever I compile GED+, I get a lot of warnings and errors, but
that's GCC being picky. You can stop the warnings by modifying CMakeLists.txt at the top level (before defining the targets): add_compile_options(-w) -- that usually works for me.
Running GCC 15.2
I'm using 11.2, but Slackware is very slow to update...
Well I added that line near the top in CMakeLists.txt as :
--
CMAKE_MINIMUM_REQUIRED(VERSION 2.8...3.19)
add_compile_options(-w)
find_program(CCACHE_PROGRAM ccache)
--
and used the command :
./dist-gpl.sh > build.log 2> build.err
which produced via ll -h build.*
-rw-r--r-- 1 mbse bbs 385K Sep 4 14:05 build.err
-rw-r--r-- 1 mbse bbs 15K Sep 4 14:05 build.log
So still produced a lot of warnings and as it is still a large file just showing the top few lines produced below :
--
gdbgtrk.cpp: In function ‘void __gftrk_track(const char*)’: gdbgtrk.cpp:110:26: warning: operation on ‘__gftrk_curr’ may be undefined [-Wsequence-point]
110 | __gftrk_curr = (++__gftrk_curr) % __gftrk_max;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gdbgtrk.cpp:110:26: warning: operation on ‘__gftrk_curr’ may be undefined [-Wsequence-point]
gftnaddr.cpp: In member function ‘char* ftn_addr::set(const char*, char*, int)’:
gftnaddr.cpp:175:28: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
175 | static char* nulchar = "";
| ^~
gftnnlfd.cpp: In member function ‘virtual bool ftn_frontdoor_nodelist_index::find(const char*)’:
gftnnlfd.cpp:724:12: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 16 equals destination size [-Wstringop-truncation]
724 | strncpy(tmp, lookup_name, sizeof(tmp));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gkbdunix.cpp: In function ‘int find_the_key(char*, gkbd_key_type**)’: gkbdunix.cpp:538:25: warning: the address of ‘gkbd_key_type::str’ will never be NULL [-Waddress]
538 | if(key and key->str)
| ~~~~~^~~
gkbdunix.cpp:366:10: note: ‘gkbd_key_type::str’ declared here
366 | char str[7];
| ^~~
glog.cpp: In member function ‘void glog::printf(const char*, ...)’: glog.cpp:172:38: warning: ‘%s’ directive writing up to 253 bytes into a region of size 248 [-Wformat-overflow=]
172 | sprintf(logbuf, "%c %s %4.4s %s", *buf, strftimei(timebuf, 20, "%d-%b %H:%M:%S", &time_now), shortprogname, buf+2);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glog.cpp:172:16: note: ‘sprintf’ output 9 or more bytes (assuming 262) into
a destination of size 256
172 | sprintf(logbuf, "%c %s %4.4s %s", *buf, strftimei(timebuf, 20, "%d-%b %H:%M:%S", &time_now), shortprogname, buf+2);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glog.cpp:168:38: warning: ‘%s’ directive writing up to 253 bytes into a region of size 248 [-Wformat-overflow=]
168 | sprintf(logbuf, "%c %s %4.4s %s", *buf, strftimei(timebuf, 20, "%d %b %H:%M:%S", &time_now), shortprogname, buf+2);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glog.cpp:168:16: note: ‘sprintf’ output 9 or more bytes (assuming 262) into
a destination of size 256
168 | sprintf(logbuf, "%c %s %4.4s %s", *buf, strftimei(timebuf, 20, "%d %b %H:%M:%S", &time_now), shortprogname, buf+2);
--
Also within the files are a lot of these :
--
eline.cpp: In function ‘void ScanKludges(GMsg*, int)’:
geline.cpp:1699:33: warning: ISO C++ forbids converting a string constant to ‘cha
r*’ [-Wwrite-strings]
1699 | "GoldED",
| ^~~~~~~~
geline.cpp:1700:33: warning: ISO C++ forbids converting a string constant to ‘cha
r*’ [-Wwrite-strings]
1700 | " GED ",
| ^~~~~~~
--
Now I program as well although using the GnuCobol compiler that traslates into C and compiles to binary etc AND I do not get warning or errors and if I do I fix them as a matter of course. I do not accept any warning or error messages as acceptable.
Pity the Golded programmers do not feel the same way.
There again I have been a professional (gets paid for it) for some 60+ years from m/f, mini's and micros.
Vincent
--- Mageia Linux v10 X64/Mbse v1.1.7.2/GoldED+/LNX 1.1.5-b20260304
* Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)