Opened 12 years ago

Closed 12 years ago

#2 closed defect (fixed)

OS/2 warnings

Reported by: abwillis Owned by: bsmith
Priority: trivial Milestone:
Component: Compat Version: 2.2
Keywords: Cc:

Description

There are a couple warnings when building with (about protmode and emx DLLs) and one with open watcom.

Change History (6)

comment:1 Changed 12 years ago by abwillis

Index: os2/dw.def
===================================================================
--- os2/dw.def	(revision 1688)
+++ os2/dw.def	(working copy)
@@ -1,7 +1,5 @@
 LIBRARY DW INITINSTANCE TERMINSTANCE
 
-PROTMODE
-
 DESCRIPTION 'Dynamic Windows for OS/2'
 
 CODE LOADONCALL
Index: os2/dw.c
===================================================================
--- os2/dw.c	(revision 1688)
+++ os2/dw.c	(working copy)
@@ -11598,7 +11598,11 @@
 int API dw_exec(char *program, int type, char **params)
 {
    type = type; /* keep compiler happy */
+#ifdef __WATCOMC__
+   return spawnvp(P_NOWAIT, program, (const char * const *)params);
+#else
    return spawnvp(P_NOWAIT, program, (char * const *)params);
+#endif
 }
 
 /*
Index: os2/dwcompat.def
===================================================================
--- os2/dwcompat.def	(revision 1688)
+++ os2/dwcompat.def	(working copy)
@@ -1,7 +1,5 @@
 LIBRARY DWCOMPAT INITINSTANCE TERMINSTANCE
 
-PROTMODE
-
 DESCRIPTION 'Dynamic Windows Compatibility Module for OS/2'
 
 CODE LOADONCALL

comment:2 Changed 12 years ago by bsmith

Where are you seeing the PROTMODE warnings? I have compiled with gcc 4.4, VAC 3.6 and OpenWatcom? 1.9 and did not see any warnings about PROTMODE. I had noticed the watcom warning about the missing const... but when I added const the other compilers complained...

Not going to be able to get all of the warnings gone with all the compilers without really mangling the code up... (VAC complains about tons of stuff it shouldn't) ... but I can commit the spawnvp() change if it is bothering you. :)

comment:3 Changed 12 years ago by abwillis

The protmode warnings (The PCCH warnings are new since this last svn pull): os2/dw.c:1516: warning: pointer targets in passing argument 3 of 'WinDrawText?' d iffer in signedness U:/USR/include/os2emx.h:5888: note: expected 'PCCH' but argument is of type 'cha r *' Warning! W1058: file ldIoGVmZ.: line(17): protmode option not valid for an OS/2 EMX dynamic link library

gcc -O -g -Zomf -Zmt -DOS2 -DST_MT_ERRNO -DUNICODE -DVER_REV=1356 -I. -W all -o dwcompat.dll -o dwcompat.dll dwcompat.obj dirent.obj -Zdll -static-libgc c -lsocket os2/dwcompat.def Warning! W1058: file ld8XQN0D.: line(20): protmode option not valid for an OS/2 EMX dynamic link library

I am setup to use wlink instead of ilink but not sure if that would make the difference if you don't get the warning.

comment:4 Changed 12 years ago by bsmith

Yeah I knew that WinDrawText?() code was going to cause a warning when I was writing it... just forgot to add the typecast before I committed it...

Regarding that protmode warning that is definitely being generated by wlink... I use ilink 5.0 to link... not sure where I got it from it was a long time ago... but I think it is newer than what came with VAC 3.6.

I've been reading a bit to see if that line is necessary or why I had it in there... I originally wrote this code over a decade ago and I can't remember why I did some things... or if it was just cut and paste. ;)

comment:5 Changed 12 years ago by bsmith

Ok so... I just committed fixes for these two warnings in addition to several other warnings... and a likely calling convention problem with Watcom in the print code.

For now I just removed the protmode statements like you suggested, if it causes problems I can revert it or reevaluate the solution later.

comment:6 Changed 12 years ago by bsmith

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.