Welcome to the Builder Academy

Question From cygwin to unix warnings 'strlcpy'

More
09 Apr 2013 00:09 - 09 Apr 2013 00:31 #1873 by JTP
Ok i finally took the step and got my code on unix BUT

i can ./configure, then make clean, then make all.

Now i get like 18 warning like this in various files:

implicit declaration of function 'strlcpy'



And 1 warning in genzon.c:77 that says:
comparison is always false due to the limited range of data type


None of this happened on cygwin, pls tell me how to fix this.

Some are in:
is_open
perform_alias
hcontrol_list_houses
do_ban
do_echo
do_doorcmd
and more

stuff i havent touched at all
Last edit: 09 Apr 2013 00:31 by JTP.

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

More
09 Apr 2013 00:35 #1875 by Fizban
Replied by Fizban on topic From cygwin to unix
is_open shouldn't be sending that warning as far as I can tell at a glance, I didn't check the other instances, but checked that one since you listed it first.

#include "sysdep.h"

is at the top of shop.c, if it weren't that'd lead to the warning in question typically.


Did you delete the makefile before re-configuring?

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

More
09 Apr 2013 00:48 #1876 by JTP
Replied by JTP on topic From cygwin to unix
Sysdep.h is in the top og shop.c

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

More
09 Apr 2013 00:56 - 09 Apr 2013 00:58 #1877 by Fizban
Replied by Fizban on topic From cygwin to unix

JTP wrote: Sysdep.h is in the top og shop.c


Aye, that's why I asked about the Makefile.

Configure creates Makefile, if you didn't delete it before re-configuring that's possibly the problem.

Note: I specifically mean "Makefile" do not delete all the Makefile.* files.

rm config.* should also be done before re-running configure
Last edit: 09 Apr 2013 00:58 by Fizban.

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

More
09 Apr 2013 01:19 - 09 Apr 2013 01:23 #1878 by JTP
Replied by JTP on topic From cygwin to unix
Its Much better now but doing ./autorun &

Gives me this message:
./autorun: line 34: ulimit: core file size: cannot modify limit: operation not permitted

What is that and how do i fix that ?



And i still get this 1:

And 1 warning in genzon.c:77 that says:
comparison is always false due to the limited range of data type
Last edit: 09 Apr 2013 01:23 by JTP.

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

More
09 Apr 2013 01:55 #1879 by Fizban
chmod -R 770 tbamud (or circlemud, whatever your main directory is names)

That'll set permissions to allow read, write, and execute for every file in the directory for owner and group, and not allow anything for others, alternatively you could use 777 which is full access for everyone (since it's on your computer and not on a remote host it'll just refer to other user accounts on your computer)

Is line 77 of genzon.c the following:
Code:
} else if (bottom < 0) { <----------- This line *error = "Bottom room cannot be less then 0.\r\n";

If so it's because:

zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top, const char **error)


bottom is a room_vnum which is defined as

typedef IDXTYPE room_vnum; /**< vnum specifically for room */

in structs.h

IDXTYPE is defined as

# define IDXTYPE ush_int /**< Index types are unsigned short ints */

An unsigned short integer can hold values 0-65535, as such:

} else if (bottom < 0) {

is redundant, bottom can't hold a value smaller than 0, which is why it's triggering that warning.

To get rid of this you could either define bottom as something which is signed, or delete and/or comment out the following lines:
Code:
} else if (bottom < 0) { *error = "Bottom room cannot be less then 0.\r\n"; return NOWHERE;

Frankly they're redundant, and serve no purpose as bottom is never, and in fact can't even possibly be less than 0 unless you change what room_vnum and/or IDXTYPE are defined as.

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

Time to create page: 0.224 seconds