quiet warning about writing to deprecated member with gcc.

This commit is contained in:
Campbell Barton 2013-03-18 18:37:59 +00:00
parent 25fa2eedc4
commit b38870ce25
2 changed files with 13 additions and 2 deletions

@ -2005,8 +2005,19 @@ static bNodeSocket *make_socket_template(bNodeTree *ntree, int in_out,
* Node sockets generally use the identifier string instead now,
* but reconstructing own_index in writefile.c would require parsing the identifier string.
*/
sock->own_index = own_index;
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
sock->own_index = own_index;
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
#endif /* USE_NODE_COMPAT_CUSTOMNODES */
sock->limit = (in_out == SOCK_IN ? 1 : 0xFFF);

@ -1272,7 +1272,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
/* draws text and icons for buttons */
static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *but, rcti *rect)
{
float alpha = (float)wcol->text[3] / 255.0;
float alpha = (float)wcol->text[3] / 255.0f;
char password_str[UI_MAX_DRAW_STR];
if (but == NULL)