Re: type-punning warnings with optimizations turned on?
- From: "Jonathan Winterflood" <jonathan winterflood gmail com>
- To: "Andreas Stricker" <andreas stricker fela ch>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: type-punning warnings with optimizations turned on?
- Date: Fri, 6 Jul 2007 09:27:46 +0200
Wouldn't that be
typedef struct MyMutex MyMutex;
rather?
Or for short :
typedex struct _MyMutex {
GStaticMutex mutex;
} MyMutex;
Cheers,
Jonathan
On 7/6/07, Andreas Stricker <andreas stricker fela ch> wrote:
Alan M. Evans schrieb:
> struct MyMutex {
> GStaticMutex mutex;
> };
Unless you add a define like "typedef MyMutex MyMutex" you have to
add the "struct" keyword. Otherwise this is an incomplete type the
compiler grouch about:
> MyMutex * MyMutex_new() {
struct MyMutex* MyMutex_new() {
> void MyMutex_free(MyMutex *mutex) {
void MyMutex_free(struct MyMutex *mutex) {
Cheers, Andy
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
<Morpheus> linux, c'est une question de VI ou de MORE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]