×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Lim Hock-Chai wrote:
Thanks Barbara. I simplified my function to make it easier for me to
ask the question. The actual function prototype looks like below:
typedef char *logECD_STP3_piModuleName_T;
Ok, say you have this:
void fn(char *p);
typedef char *MyType;
void myFn()
{
MyType s;
fn( (char *) s;
}
Since MyType is actually char *, then the cast is _currently_ correct.
But what if someone changes MyType to be say one of your varying-length
structs? Now you are casting a varying-struct pointer to a char
pointer. The compiler will be happy, but your code will not work.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.