Date: Sun, 18 Mar 2012 14:36:15 GMT From: Shane Ambler <FreeBSD@Shaneware.biz> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/166221: [patch] clang build for x11/menu-cache Message-ID: <201203181436.q2IEaFRi044684@red.freebsd.org> Resent-Message-ID: <201203181440.q2IEe9f1064725@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 166221 >Category: ports >Synopsis: [patch] clang build for x11/menu-cache >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Mar 18 14:40:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Shane Ambler >Release: 9.0-RELEASE >Organization: >Environment: FreeBSD leader.local 9.0-RELEASE FreeBSD 9.0-RELEASE #1: Wed Feb 15 16:03:18 CST 2012 root@:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The attached patch allows x11/libmenu-cache to compile with clang. Tested with tinderbox to compile with the following combinations - 10-CURRENT-amd64-clang 10-CURRENT-amd64-gcc 10-CURRENT-i386-clang 10-CURRENT-i386-gcc 9-STABLE-amd64-clang 9-STABLE-amd64-gcc 9-STABLE-i386-clang 9-STABLE-i386-gcc 8-STABLE-amd64-gcc 8-STABLE-i386-gcc 7-STABLE-amd64-gcc 7-STABLE-i386-gcc >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # files/patch-libmenu-cache__menu-cache.c # echo x - files/patch-libmenu-cache__menu-cache.c sed 's/^X//' >files/patch-libmenu-cache__menu-cache.c << '8c99961a273ed64a08f00dfcebe1fedb' X--- ./libmenu-cache/menu-cache.c.orig 2012-03-18 14:12:13.000000000 +1030 X+++ ./libmenu-cache/menu-cache.c 2012-03-18 14:13:02.000000000 +1030 X@@ -226,7 +226,7 @@ X X /* file name */ X if( G_UNLIKELY( ! fgets( line, G_N_ELEMENTS(line) - 1, f ) )) X- return; X+ return NULL; X len = strlen( line ); X if( G_LIKELY(len > 1) ) X item->file_name = g_strndup( line, len - 1 ); X@@ -240,7 +240,7 @@ X X /* desktop file dir */ X if( G_UNLIKELY( ! fgets( line, G_N_ELEMENTS(line) - 1, f ) )) X- return; X+ return NULL; X idx = atoi( line ); X if( G_LIKELY( idx >=0 && idx < cache->n_all_used_files ) ) X item->file_dir = cache->all_used_files[ idx ] + 1; 8c99961a273ed64a08f00dfcebe1fedb exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203181436.q2IEaFRi044684>