Mercurial > pidgin
annotate plugins/crazychat/face.c @ 12435:8f98014a4e7d
[gaim-migrate @ 14742]
1. Protecting the --enable-debug warning tests with an "if gcc" check.
2. Adding a number of warning flags to --enable-debug. All cases of the added warnings have been fixed, except:
a. The pointer-arith warnings. I think someone smarter than me should decide whether we need to fix those (and how) or if that should be disabled. That said, I think all the errors left (after you consider the exception listed as "b" below) are in libzephyr.
b. Those in src/protocols/sametime/meanwhile at siege's request. Don't worry about these for now.
3. Noting a few warnings we could enable, and the cases we'd have to deal with. Thoughts on these warnings?
4. I added support for FORTIFY_SOURCE. If your compiler has support for this feature, --enable-debug will set _FORTIFY_SOURCE=2. I'm doing this in --enable-debug for the warnings you get. I wouldn't mind having it on by default for the runtime protections as well. Thoughts?
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Fri, 09 Dec 2005 05:32:59 +0000 |
| parents | ed017b9c532d |
| children |
| rev | line source |
|---|---|
| 11218 | 1 #include "face.h" |
| 2 #include "sharky.h" | |
| 3 #include "doggy.h" | |
| 4 #include <assert.h> | |
| 5 | |
| 6 FACE init_face(KIND kind) | |
| 7 { | |
| 8 FACE face; | |
| 9 face = (FACE)malloc(sizeof(*face)); | |
| 10 | |
| 11 switch(kind){ | |
| 12 case DOG: | |
| 13 init_dog(face); | |
| 14 break; | |
| 15 case SHARK: | |
| 16 init_shark(face); | |
| 17 break; | |
| 18 default: | |
| 19 printf("default face\n"); | |
| 20 init_dog(face); | |
| 21 break; | |
| 22 } | |
| 23 return face; | |
| 24 } | |
| 25 | |
| 26 void draw_face(FACE face, GLfloat zrot, GLfloat yrot, BOOL left_eye, BOOL right_eye, GLfloat mouth_open, DIRECTION dir, OUTPUT_MODE mode){ | |
| 27 face->draw_func(face, zrot, yrot, left_eye, right_eye, mouth_open, dir, mode); | |
| 28 } | |
| 29 | |
| 30 void change_materials(FACE f, int* mats, int num_change){ | |
| 31 int i; | |
| 32 assert(!(num_change<0 || num_change>NUM_PARTS)); | |
| 33 for(i=0;i<num_change;i++){ | |
| 34 f->mat_indeces[i]=mats[i]; | |
| 35 } | |
| 36 } | |
| 37 | |
| 38 void free_face(FACE f){} |
