Hi,
Trying to compile ft2demos 2.4.12 on the current Ubuntu, I hit some
potentially unitiazialized variable warnings [1] in ftview.c. The
following patch fixes the issue, but I'm unsure if the NULL value is
problematic to the following calls (it might be better to add a default:
case to the switch and set values there)
Cheers,
Sebastien Bacher
(sorry for the direct Cc, I'm not subscribed to the list and I'm not
sure if sending the email there will work)
[1] e.g "ftview.c:1590:24: error: ‘lcd_mode’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]"
--- ft2demos-2.4.12/src/ftview.c 2013-05-13 13:32:54.433099060 +0200
+++ ft2demos-2.4.12/src/ftview.c.new 2013-05-13 13:31:17.297095826 +0200
@@ -1420,7 +1420,7 @@
if ( !( status.render_mode == RENDER_MODE_TEXT ||
status.render_mode == RENDER_MODE_WATERFALL ) )
{
- const char* encoding;
+ const char* encoding = NULL;
switch ( status.encoding )
@@ -1489,7 +1489,7 @@
/* render mode */
{
- const char* render_mode;
+ const char* render_mode = NULL;
switch ( status.render_mode )
@@ -1563,7 +1563,7 @@
if ( handle->antialias )
{
- const char* lcd_mode;
+ const char* lcd_mode = NULL;
switch ( handle->lcd_mode )
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel