pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48318: devel/glib2 doesn't build with clang



>Number:         48318
>Category:       pkg
>Synopsis:       devel/glib2 doesn't build with clang
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 16 18:00:00 +0000 2013
>Originator:     ef%math.uni-bonn.de@localhost
>Release:        pkgsrc-2013Q3
>Organization:
        
>Environment:
        
>Description:
        Building devel/glib2 fails with
        gmessages.c:1062:3: error: data argument not used by format string 
[-Wformat-extra-args]
>How-To-Repeat:
        cd devel/glib2; make build
>Fix:
        $NetBSD: patch-glib_gmessages.c $
        # clang will error out on the unused NULL-"expression" argument in 
g_assert_warning()
        --- glib/gmessages.c.orig       2013-08-07 16:34:32.000000000 +0200
        +++ glib/gmessages.c    2013-10-16 18:47:27.000000000 +0200
        @@ -1051,15 +1051,21 @@
                          const char *pretty_function,
                          const char *expression)
         {
        -  g_log (log_domain,
        -        G_LOG_LEVEL_ERROR,
        -        expression 
        -        ? "file %s: line %d (%s): assertion failed: (%s)"
        -        : "file %s: line %d (%s): should not be reached",
        -        file, 
        -        line, 
        -        pretty_function,
        -        expression);
        +  if (expression)
        +    g_log (log_domain,
        +          G_LOG_LEVEL_ERROR,
        +          "file %s: line %d (%s): assertion failed: (%s)",
        +          file, 
        +          line, 
        +          pretty_function,
        +          expression);
        +  else
        +    g_log (log_domain,
        +          G_LOG_LEVEL_ERROR,
        +          "file %s: line %d (%s): should not be reached",
        +          file, 
        +          line, 
        +          pretty_function);
           abort ();
         }
         

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index