|
From: Maurice L. <mj...@ga...> - 2001-11-29 06:03:27
|
Andrew Roach writes: > While trying to track down the problem with X20C and DJGPP I noticed that > there were several warnings for incompatible pointers being passed. Not a > real issue, it was just PLINT being passed to int and vice versa. Since > PLINT and int are usually the same it should not have made a real > difference to my problem, but it does present an ascetic situation for > compiling without warnings. > > One thing I did find was that most of the new plimage commands expect > *dev_ix and *dev_iy in the PLStream structure to be defined as PLINT while > the PLStream structure defines them as type int. I know that is a simple > fix, but this is not really the reason I am writing the email. There are > many other variables of type "int" in PLStream, while the vast majority are > of type "PLINT". Is there any particular reason for this ? Any pointer should be a (PLINT *), without fail, else bad things can happen. But for vanilla integers it doesn't matter so much. For local temporary variables I think it's preferable to just use int or long as appropriate. The only negative is if you assign a PLINT to an int you might get compiler warnings about possible overflow. -- Maurice LeBrun mj...@ga... |