Moderators: sparcdr, torhu, Tequila
CC code/client/cl_cgame.c
code/client/cl_cgame.c: In function 'stristr':
code/client/cl_cgame.c:431: warning: implicit declaration of function 'strupr'
code/client/cl_cgame.c: In function 'fixBadWords':
code/client/cl_cgame.c:456: warning: suggest parentheses around assignment used as truth value
code/client/cl_cgame.c:458: warning: implicit declaration of function 'min'
code/client/cl_cgame.c:462: warning: implicit declaration of function 'stricmp'
code/client/cl_cgame.c:463: warning: implicit declaration of function 'strnset'
code/client/cl_cgame.c: In function 'CL_InitCGame':
code/client/cl_cgame.c:828: warning: pointer targets in assignment differ in signedness
code/client/cl_cgame.c:829: warning: pointer targets in passing argument 1 of '__builtin_strchr' differ in signedness
code/client/cl_cgame.c:829: warning: suggest parentheses around assignment used as truth value
code/client/cl_cgame.c:833: warning: pointer targets in passing argument 1 of '__builtin_strchr' differ in signedness
code/client/cl_cgame.c:833: error: invalid operands to binary - (have 'char *' and 'byte *')
code/client/cl_cgame.c:833: warning: pointer targets in passing argument 2 of '__builtin_strncpy' differ in signedness
code/client/cl_cgame.c:834: warning: pointer targets in passing argument 1 of '__builtin_strchr' differ in signedness
code/client/cl_cgame.c:834: error: invalid operands to binary - (have 'char *' and 'byte *')
code/client/cl_cgame.c:836: warning: pointer targets in assignment differ in signedness
code/client/cl_cgame.c:842: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
code/client/cl_cgame.c:842: warning: pointer targets in passing argument 1 of '__strdup' differ in signedness
make[2]: *** [build/release-linux-x86_64/client/cl_cgame.o] Error 1
Tequila wrote:Then I tried to integrate your mod in the 1.1 branch. I got a lot of compilation problems. I look a little more on the code and here are few comments I want you to consider
1. Can you try the current 1.1 branch ?
Tequila wrote:2. Can you try then to use Q_stristr instead of adding your own stristr in cl_cgame.c ?
3. Can you check to use Q_stricmp also ?
Tequila wrote:...4. On which platform are you modding ? It seems mine (Linux) knows nothing of "strnset", then can you find a way to replace it ?
Tequila wrote:5. Can you take a look at Sys_ListFiles and try to use the same APIs for memory allocations ?
Tequila wrote:6. Why did you focus on a filter file ? Why not using a dedicated cvar we can edit directly in the game ? Even if we are limited in size, your cvar will be stored in standard configuration.
Tequila wrote:7. Why not simply discard a message which contains a badword ?
8. You should check eventually to use the Q_CleanStr API before parsing the message so you won't have color pollution.
Tequila wrote:9. Finally, can you active compiler warnings when you build your engine ? You'll see some important casting warnings that I don't want to see before merging a code
Tequila wrote:I can manage to remove some but that won't be your code any more then.
sparcdr wrote:1.1 builds on Windows now (VC9) but QVM build process is broken. The engine itself does build, so you can go ahead and try and merge with revision 182 and see how that goes.
Tequila wrote::D
Well it looks prettier then, but did you forget something ?
How is the badWords array loaded ?
Thanks to have followed my advice