| Title: | AMIGA NOTES |
| Notice: | Join us in the *NEW* conference - HYDRA::AMIGA_V2 |
| Moderator: | HYDRA::MOORE |
| Created: | Sat Apr 26 1986 |
| Last Modified: | Wed Feb 05 1992 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 5378 |
| Total number of notes: | 38326 |
I seem to be having some problems with Manx C 3.40a. I get warnings of PTR/INT
conversions that I supposedly don't have to worry about if my INT is the same
size as a PTR.
Here a a couple of lines that will cause the warning (#121 I think):
struct IntuitionBase *IntuitionBase;
IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",vers);
I have seen identical code in other's programs and have used the same switchs
when I compile but to no avail ( yeah, I know I can set a switch to give no
warnings ).
Anybody know how you avoid these warnings?
Thanks,
Dick
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 542.1 | COOKIE::WECKER | Dave (Cum Grano Salis) Wecker | Wed Jun 10 1987 17:53 | 14 | |
re: .0
> struct IntuitionBase *IntuitionBase;
> IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",vers);
The only things that I do different/in_addition are:
1) Make sure that you #include <functions.h> so that OpenLibrary
has the right type. (Otherwise it will be a short int and
won't type cast).
2) make sure vers is of type LONG.
dave
| |||||
| 542.2 | Alternate suggestions | SQM::JMSYNGE | James M Synge, VMS Performance Anal. | Fri Jun 12 1987 12:51 | 18 |
I find Manx's <functions.h> to be a real pain. Some of the Amiga
routines seem to have been mis-typed in the file.
As a results, I always use code of the form
struct Library *OpenLibrary();
struct IntuitionBase *IntuitionBase;
IntuitionBase =
(struct IntuitionBase *)OpenLibrary("intuition.library",vers);
Alternately, you could specify OpenLibrary's type as
struct IntuitionBase *OpenLibrary();
if Intuition was the only library you were planning to open.
James Synge
| |||||