Welcome to the Builder Academy

Question tbaMUD 2021 Pre-release Bugs

More
06 Mar 2021 16:07 - 09 Mar 2021 16:23 #9784 by Rumble
tbaMUD Team,
   I was hoping for a quick and easy release for 2021, but of course I should have known better. I ran into several errors in the src/util directory. If anyone has some free time I could use some help resolving or even possibly removal of some these outdated files. m-w.com has not worked for a while and not sure it is worth the effort to maintain. I have limited bandwidth getting ready for a move overseas. Appreciate the assistance, the latest is on github.

Code:
gcc -g -O2 -Wall -Wno-char-subscripts -Wno-unused-but-set-variable -DCIRCLE_UTIL  -I.. -o ../../bin/shopconv shopconv.c shopconv.c: In function ‘main’: shopconv.c:167:23: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]      sprintf(part, "mv %s %s.tmp", fn, fn);                        ^~          ~~ shopconv.c:167:5: note: ‘sprintf’ output between 9 and 519 bytes into a destination of size 256      sprintf(part, "mv %s %s.tmp", fn, fn);      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ shopconv.c:169:22: warning: ‘.tmp’ directive writing 4 bytes into a region of size between 1 and 256 [-Wformat-overflow=]      sprintf(part, "%s.tmp", fn);                       ^~~~ shopconv.c:169:5: note: ‘sprintf’ output between 5 and 260 bytes into a destination of size 256      sprintf(part, "%s.tmp", fn);      ^~~~~~~~~~~~~~~~~~~~~~~~~~~ shopconv.c:113:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 127 [-Wformat-overflow=]    sprintf(buf2, "beginning of shop file %s", filename);                                          ^~ shopconv.c:180:47:        result = boot_the_shops_conv(sfp, nsfp, fn);                                                ~~ shopconv.c:113:3: note: ‘sprintf’ output between 24 and 279 bytes into a destination of size 150    sprintf(buf2, "beginning of shop file %s", filename);    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ shopconv.c:184:20: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]   sprintf(part, "mv %s.tmp %s", fn, fn);                     ^~          ~~ shopconv.c:184:2: note: ‘sprintf’ output between 9 and 519 bytes into a destination of size 256   sprintf(part, "mv %s.tmp %s", fn, fn);   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ shopconv.c:187:20: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]   sprintf(part, "mv %s.tmp %s.bak", fn, fn);                     ^~              ~~ shopconv.c:187:2: note: ‘sprintf’ output between 13 and 523 bytes into a destination of size 256   sprintf(part, "mv %s.tmp %s.bak", fn, fn);   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ shopconv.c:119:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 119 and 129 [-Wformat-overflow=]        sprintf(buf2, "shop #%d in shop file %s", temp, filename);                                             ^~ shopconv.c:180:47:        result = boot_the_shops_conv(sfp, nsfp, fn);                                                ~~ shopconv.c:119:7: note: ‘sprintf’ output between 22 and 287 bytes into a destination of size 150        sprintf(buf2, "shop #%d in shop file %s", temp, filename);        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -g -O2 -Wall -Wno-char-subscripts -Wno-unused-but-set-variable -DCIRCLE_UTIL  -I.. -o ../../bin/webster webster.c webster.c: In function ‘parse_webster_html’: webster.c:106:9: warning: ‘strncpy’ specified bound 10000 equals destination size [-Wstringop-truncation]          strncpy(scanbuf, p, sizeof(scanbuf)); // strtok on a copy.          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ webster.c:75:9: warning: ‘strncpy’ specified bound 10000 equals destination size [-Wstringop-truncation]          strncpy(scanbuf, p, sizeof(scanbuf)); // strtok on a copy.          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
Last edit: 09 Mar 2021 16:23 by Rumble.
The following user(s) said Thank You: lacrc

Please Log in or Create an account to join the conversation.

More
09 Mar 2021 21:16 #9786 by thomas
Replied by thomas on topic tbaMUD 2021 Pre-release Bugs
They're fixed in github.com/tbamud/tbamud/pull/99/files .

I also removed m-w.com. A new integration is on it's way in another form.
The following user(s) said Thank You: lacrc

Please Log in or Create an account to join the conversation.

More
07 Apr 2021 21:04 #9794 by cunning
Personally, I converted most of the char to const char to get rid of most of these compiler errors and be more efficient on memory. I also added tons of mysql to the code base.

I am considering donating Mysql (mariadb) to this code base. I use it for player index with the file as a backup. I keep a record of players information in addition to the file. I do online/vs offline for website interaction,. I also integrated our remort system into sql as well, to track our characters that remort. I also took a page out of Luminari (an excellent code base as well), and moved help/hedit over to mysql. In addition, i plan to move over rent files and mudmail over to this. Our Mud mail also does object mail. I also do object versions, player file versions, and world format version so if something is upgraded, it updates all, including if a character logs in their rented object automatically updates.

I am a Cisco network designer by trade, and a C coder as a hobby for 20+ years, but no where near Thomas level.

Please Log in or Create an account to join the conversation.

More
12 Apr 2021 14:57 #9822 by mr514
Replied by mr514 on topic tbaMUD 2021 Pre-release Bugs
Do you know if it is possible to get those changes? Git does not want me to download anything but master repo. I only waited to get started due to the possible release coming up but been couple weeks now. I suppose it would be possible to use 3.68 and manually update it. Ugh. Take care and thanks for the effort folks.

Please Log in or Create an account to join the conversation.

More
12 Apr 2021 19:33 #9823 by thomas
Replied by thomas on topic tbaMUD 2021 Pre-release Bugs
git checkout will check out the "full" repo.

Then, cd to the directory and checkout the remove-warnings-before-2021-release branch:
git checkout remove-warnings-before-2021-release

These are the changes I have an open PR on atm.
The following user(s) said Thank You: mr514

Please Log in or Create an account to join the conversation.

More
13 Apr 2021 10:35 #9827 by mr514
Replied by mr514 on topic tbaMUD 2021 Pre-release Bugs
Thanks very much, knowing it seemed possible was enough to poke github until it gave up a zip of the fixes, I was not certain. Stay safe!

Please Log in or Create an account to join the conversation.

Time to create page: 0.261 seconds