From owner-svn-ports-all@freebsd.org Fri Feb 19 03:16:44 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5BC4AAC787; Fri, 19 Feb 2016 03:16:44 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3D7E1BD8; Fri, 19 Feb 2016 03:16:44 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1J3GhTR019470; Fri, 19 Feb 2016 03:16:43 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1J3GhKL019468; Fri, 19 Feb 2016 03:16:43 GMT (envelope-from mi@FreeBSD.org) Message-Id: <201602190316.u1J3GhKL019468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Fri, 19 Feb 2016 03:16:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r409147 - in head/graphics/libfpx: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 03:16:45 -0000 Author: mi Date: Fri Feb 19 03:16:43 2016 New Revision: 409147 URL: https://svnweb.freebsd.org/changeset/ports/409147 Log: Add a patch to get rid of some dead code, which triggers a warning when compiled with clang-3.8. Bump PORTREVISION. PR: 207134 Added: head/graphics/libfpx/files/patch-ebuffer (contents, props changed) Modified: head/graphics/libfpx/Makefile Modified: head/graphics/libfpx/Makefile ============================================================================== --- head/graphics/libfpx/Makefile Fri Feb 19 03:16:02 2016 (r409146) +++ head/graphics/libfpx/Makefile Fri Feb 19 03:16:43 2016 (r409147) @@ -3,6 +3,7 @@ PORTNAME= libfpx DISTVERSION= 1.3.1-4 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= http://imagemagick.mirrorcatalogs.com/delegates/ \ http://www.imagemagick.org/download/delegates/ \ Added: head/graphics/libfpx/files/patch-ebuffer ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libfpx/files/patch-ebuffer Fri Feb 19 03:16:43 2016 (r409147) @@ -0,0 +1,126 @@ +This removes unused code from ebuffer -- some of that code never +worked and now clang-3.8.0 issues a very valid warning about it... + +Some of the variables are made static, while I'm here. This code +was never thread-safe either... + + -mi + +--- jpeg/ebuffer.h 2013-09-02 11:45:00.000000000 -0400 ++++ jpeg/ebuffer.h 2016-02-18 16:31:36.053668000 -0500 +@@ -22,26 +22,12 @@ + long int buf_size); + JPEGEXPORT +-void EB_Clear(unsigned char *buf, /* output buffer */ +- long int buf_size); +-JPEGEXPORT +-void EB_Write_Bits_Init(unsigned char *buf, /* compressed bitstream buffer */ +- long int buf_size); +-JPEGEXPORT +-void EB_Write_Bytes(unsigned char *data, +- int size); ++void EB_Write_Bytes(const void *data, size_t size); + JPEGEXPORT + long cEB_Byte_Count(void); + + JPEGEXPORT +-void EB_Copy_To_Memory(unsigned char *buf, +- unsigned char *mem, +- long int num); +-JPEGEXPORT + void EB_End(long int *bytes); + + JPEGEXPORT +-void EB_Write_Bits_End(long int *bytes); +- +-JPEGEXPORT + int EB_Write_Bits(int val, + int nbits); +--- jpeg/ebuffer.c 2013-09-02 11:45:00.000000000 -0400 ++++ jpeg/ebuffer.c 2016-02-18 16:32:03.964436000 -0500 +@@ -24,9 +24,9 @@ + + /****************************** GLOBAL VARIABLES **************************/ +-unsigned char *eb_ptr; /* points to next avaible byte in output buffer */ +-unsigned char eb_byte; /* current output byte to be inserted into buffer */ +-int eb_nbits; /* # bits available in *eb_ptr */ +-unsigned char *eb_end_ptr, *eb_start_ptr; +-long int eb_byte_count; ++static unsigned char *eb_ptr; /* points to next avaible byte in output buffer */ ++static unsigned char eb_byte; /* current output byte to be inserted into buffer */ ++static int eb_nbits; /* # bits available in *eb_ptr */ ++static unsigned char *eb_end_ptr, *eb_start_ptr; ++static long int eb_byte_count; + + void EB_Init(unsigned char *buf, /* output buffer */ +@@ -40,31 +40,7 @@ + } + +-void EB_Clear(unsigned char *buf, /* output buffer */ +-long int buf_size) +-{ +- unsigned char *eb_ptr, *eb_end_ptr; +- +- eb_end_ptr = buf + buf_size; +- for (eb_ptr = buf; eb_ptr < eb_end_ptr ;*eb_ptr++ = 0) +- eb_byte = 0; +- eb_nbits = 8; +- eb_byte_count = 0; +-} +- +-void EB_Write_Bits_Init(unsigned char *buf, /* compressed bitstream buffer */ +-long int buf_size) +-{ +- eb_ptr = eb_start_ptr = buf; +- eb_end_ptr = buf + buf_size; +- eb_byte = 0; +- eb_nbits = 8; +- eb_byte_count = 0; +-} +- +-void EB_Write_Bytes(unsigned char *data, +-int size) ++void ++EB_Write_Bytes(const void *data, size_t size) + { +- int i; +- unsigned char *ptr; + + /* byte-align previous bits if any */ +@@ -74,24 +50,5 @@ + if (eb_byte == 0xff) *eb_ptr++ = 0x00; /* byte stuffing */ + } +- for (i=0, ptr=data; i < size ;i++) { +- *eb_ptr++ = *ptr++; +- } +-} +- +-/* calculates the actual number of bytes written into output buffer */ +-long cEB_Byte_Count(void) +-{ +- return((long)(eb_ptr - eb_start_ptr)); +-} +- +-void EB_Copy_To_Memory(unsigned char *buf, +-unsigned char *mem, +-long int num) +-{ +- long int i; +- unsigned char *mem_ptr,*buf_ptr; +- +- for(i=0,mem_ptr=mem,buf_ptr=buf; i < num ;*mem_ptr++=*buf_ptr++); +- ++ memcpy(eb_ptr, data, size); + } + +@@ -102,10 +59,4 @@ + } + +-/* calculates the actual number of bytes written into output buffer */ +-void EB_Write_Bits_End(long int *bytes) +-{ +- *bytes = eb_ptr - eb_start_ptr; +-} +- + /* + * Write 'nbits' bits of 'val' to the output buffer.