! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Broken build with GCC 4.8.1
Status:
RESOLVED: FIXED
Product:
Xfce4-mixer
Component:
General

Comments

Description Steven Jackson 2013-11-08 00:59:47 CET
Created attachment 5226 
Fixes a build error.

I'm using Xubuntu 13.10 and tried to build git master.

As -Werror is specified the following warning prevents a build:

xfce-mixer-debug.c: In function 'xfce_mixer_debug_real':
xfce-mixer-debug.c:103:3: error: function might be possible candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
   g_logv (log_domain, G_LOG_LEVEL_DEBUG, prefixed_format, args);
   ^
cc1: all warnings being treated as errors

I've attached a fix.
Comment 1 Jannis Pohlmann editbugs 2014-07-25 13:49:24 CEST
Fixed in master (see commit message below). I've used G_GNUC_PRINTF instead of the GCC-specific __attribute__((format(printf, ..., ...)) notation. The latter would break the build on various compilers and G_GNUC_PRINTF fixes that.

commit ff84f0eef42ac6fb7a285a8ee1646600ead10c8e
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Fri Jul 25 13:45:14 2014 +0200

    Fix build with GCC 4.8.1 by using G_GNUC_PRINTF (bug #10474)
Comment 2 Guido Berhoerster 2014-07-25 13:57:23 CEST
The actual problem here is that you compile with --enable-debug (default if you use an unreleased git version) which triggers -Werror which in turn leads gcc to trip over many bogus warnings which are no bugs at all such as this one. If you're not a developer use ./autogen --enable-debug=minimum.

Bug #10474

Reported by:
Steven Jackson
Reported on: 2013-11-08
Last modified on: 2014-07-25

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
Unspecified

Attachments

Fixes a build error. (1.03 KB, patch)
2013-11-08 00:59 CET , Steven Jackson
no flags

Additional information