memeco / osd-lyrics

Automatically exported from code.google.com/p/osd-lyrics
GNU General Public License v3.0
1 stars 0 forks source link

GCC warning fixes (they are errors because of -Werror) #247

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
请列出导致问题的操作
1. Just try to build on any version of FreeBSD with default settings

What's version of OSD Lyrics?
OSD Lyrics的版本是多少?
The latest one, 0.4.1

What's your Linux distro?
您使用哪种发行版?
FreeBSD 8.2-STABLE

Original issue reported on code.google.com by adokuch...@gmail.com on 18 Nov 2011 at 11:34

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for your patch. I have merge the patch and committed it to the develop 
branch on GitHub. Would you please try it?

Original comment by tigerso...@gmail.com on 21 Nov 2011 at 5:28

GoogleCodeExporter commented 8 years ago

Original comment by tigerso...@gmail.com on 21 Nov 2011 at 5:28

GoogleCodeExporter commented 8 years ago
Thanks!  Builds fine (well, almost, see below), and special thanks for taking 
care of different iconv prototypes.

However, in develop branch, there is new file, src/ol_app_chooser_widget.c, 
which also does not build with -Werror:

cc1: warnings being treated as errors
ol_app_chooser_widget.c: In function 'ol_app_chooser_widget_set_app_list':
ol_app_chooser_widget.c:129: error: 'n_rows' may be used uninitialized in this 
function
gmake[3]: *** [ol_app_chooser_widget.o] Error 1

It does not look any FreeBSD-specific, and I don't really see why it breaks.  I 
also don't understand why this code builds for you (I assume you always build 
with -Werror).  Maybe because we have slightly different Glib/Gtk versions?

I've tried to build with GCC versions 4.2 and 4.4, same result.

Naturally, replacing it with "guint n_rows = 0;" makes the problem go away, but 
I don't like this fix since I don't really see where the problem comes from.

Original comment by adokuch...@gmail.com on 21 Nov 2011 at 7:02

GoogleCodeExporter commented 8 years ago
I think this is because my GCC is 4.6.

I have pushed the fix to the git repo.

Original comment by tigerso...@gmail.com on 23 Nov 2011 at 2:12