From owner-svn-ports-head@freebsd.org Sun Mar 3 23:00:40 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C9861520A65; Sun, 3 Mar 2019 23:00:40 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1423772743; Sun, 3 Mar 2019 23:00:40 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07CBB23478; Sun, 3 Mar 2019 23:00:40 +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 x23N0d3S034795; Sun, 3 Mar 2019 23:00:39 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x23N0csZ034789; Sun, 3 Mar 2019 23:00:38 GMT (envelope-from mi@FreeBSD.org) Message-Id: <201903032300.x23N0csZ034789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Sun, 3 Mar 2019 23:00:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r494530 - in head/graphics/libjxr: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mi X-SVN-Commit-Paths: in head/graphics/libjxr: . files X-SVN-Commit-Revision: 494530 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1423772743 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2019 23:00:40 -0000 Author: mi Date: Sun Mar 3 23:00:38 2019 New Revision: 494530 URL: https://svnweb.freebsd.org/changeset/ports/494530 Log: Fix handling of (some of) the warnings, by fixing them at the sources, rather than disabling them on command-line. The disabling was not working with gcc. PR: 236018 Submitted by: Piotr Kubaj Added: head/graphics/libjxr/files/patch-jxrlib_warnings (contents, props changed) Modified: head/graphics/libjxr/Makefile head/graphics/libjxr/files/BSDmakefile.JxrDecApp head/graphics/libjxr/files/BSDmakefile.JxrEncApp head/graphics/libjxr/files/BSDmakefile.jxrgluelib head/graphics/libjxr/files/BSDmakefile.libjpegxr Modified: head/graphics/libjxr/Makefile ============================================================================== --- head/graphics/libjxr/Makefile Sun Mar 3 22:33:55 2019 (r494529) +++ head/graphics/libjxr/Makefile Sun Mar 3 23:00:38 2019 (r494530) @@ -12,10 +12,6 @@ COMMENT= Library for JPEG XR, a.k.a. Windows MediaTM P LICENSE= BSD2CLAUSE -BROKEN_mips= fails to compile: cc1: unrecognized command line option "-Wno-extra-tokens" -BROKEN_mips64= fails to compile: cc1: unrecognized command line option "-Wno-extra-tokens" -BROKEN_powerpc64= fails to compile: cc1: unrecognized command line option "-Wno-extra-tokens" - USES= dos2unix uidfix USE_LDCONFIG= yes MAKEFILE= BSDmakefile # created by do-configure Modified: head/graphics/libjxr/files/BSDmakefile.JxrDecApp ============================================================================== --- head/graphics/libjxr/files/BSDmakefile.JxrDecApp Sun Mar 3 22:33:55 2019 (r494529) +++ head/graphics/libjxr/files/BSDmakefile.JxrDecApp Sun Mar 3 23:00:38 2019 (r494530) @@ -5,7 +5,7 @@ MANDIR= ${MANPREFIX}/man/man CFLAGS= -I${.CURDIR:H}/jxrgluelib -I${.CURDIR:H}/jxrtestlib CFLAGS+=-I${.CURDIR:H}/image/sys -I${.CURDIR:H}/common/include -CFLAGS+=-Wno-extra-tokens -D__ANSI__ -DDISABLE_PERF_MEASUREMENT +CFLAGS+=-D__ANSI__ -DDISABLE_PERF_MEASUREMENT LDADD= -L${.CURDIR:H}/jxrgluelib -Wl,-rpath-link=${.CURDIR:H}/libjpegxr -ljxrglue Modified: head/graphics/libjxr/files/BSDmakefile.JxrEncApp ============================================================================== --- head/graphics/libjxr/files/BSDmakefile.JxrEncApp Sun Mar 3 22:33:55 2019 (r494529) +++ head/graphics/libjxr/files/BSDmakefile.JxrEncApp Sun Mar 3 23:00:38 2019 (r494530) @@ -5,7 +5,7 @@ MANDIR= ${MANPREFIX}/man/man CFLAGS= -I${.CURDIR:H}/jxrgluelib -I${.CURDIR:H}/jxrtestlib CFLAGS+=-I${.CURDIR:H}/image/sys -I${.CURDIR:H}/common/include -CFLAGS+=-Wno-extra-tokens -D__ANSI__ -DDISABLE_PERF_MEASUREMENT +CFLAGS+=-D__ANSI__ -DDISABLE_PERF_MEASUREMENT LDADD= -L${.CURDIR:H}/jxrgluelib -Wl,-rpath-link=${.CURDIR:H}/libjpegxr -ljxrglue Modified: head/graphics/libjxr/files/BSDmakefile.jxrgluelib ============================================================================== --- head/graphics/libjxr/files/BSDmakefile.jxrgluelib Sun Mar 3 22:33:55 2019 (r494529) +++ head/graphics/libjxr/files/BSDmakefile.jxrgluelib Sun Mar 3 23:00:38 2019 (r494530) @@ -14,7 +14,6 @@ SRCS+= JXRTest.c JXRTestBmp.c JXRTestHdr.c JXRTestPnm. CFLAGS+= -I. -I${.CURDIR:H}/common/include -I${.CURDIR:H}/image/sys CFLAGS+= -I${.CURDIR:H}/jxrtestlib CFLAGS+= -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -CFLAGS+= -Wno-extra-tokens LDADD= -L${.CURDIR:H}/libjpegxr -ljpegxr -lm Modified: head/graphics/libjxr/files/BSDmakefile.libjpegxr ============================================================================== --- head/graphics/libjxr/files/BSDmakefile.libjpegxr Sun Mar 3 22:33:55 2019 (r494529) +++ head/graphics/libjxr/files/BSDmakefile.libjpegxr Sun Mar 3 23:00:38 2019 (r494530) @@ -16,6 +16,5 @@ SRCS= encode.c segenc.c strenc.c strFwdTransform.c st CFLAGS+= -I. -I${.CURDIR:H}/common/include -I${.CURDIR:H}/image/sys CFLAGS+= -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -CFLAGS+= -Wno-extra-tokens .include Added: head/graphics/libjxr/files/patch-jxrlib_warnings ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/patch-jxrlib_warnings Sun Mar 3 23:00:38 2019 (r494530) @@ -0,0 +1,175 @@ +Largely from https://archive.codeplex.com/?p=jxrlib (issue +https://archive.codeplex.com/projects/jxrlib/issues/13/1483483). + + -mi + +--- image/sys/strcodec.c 2013-03-20 19:16:21.000000000 +0100 ++++ image/sys/strcodec.c 2015-09-03 10:30:31.018971760 +0200 +@@ -668,9 +668,7 @@ ERR detach_SB(SimpleBitIO* pSB) + // WinCE ARM and Desktop x86 + #else + // other platform +-#ifdef _BIG__ENDIAN_ +-#define _byteswap_ulong(x) (x) +-#else // _BIG__ENDIAN_ ++#ifndef _BIG__ENDIAN__ + U32 _byteswap_ulong(U32 bits) + { + U32 r = (bits & 0xffu) << 24; +--- image/sys/strcodec.h 2013-03-21 19:22:34.000000000 +0100 ++++ image/sys/strcodec.h 2015-09-03 10:30:31.019971779 +0200 +@@ -64,7 +64,7 @@ + + #ifndef UNREFERENCED_PARAMETER + #define UNREFERENCED_PARAMETER(P) { (P) = (P); } +-#endif UNREFERENCED_PARAMETER ++#endif // UNREFERENCED_PARAMETER + + #ifdef UNDER_CE + #define PLATFORM_WCE +@@ -673,6 +673,16 @@ void flushToByte(BitIOInfo* pIO); + pIO->cBitsUsed &= 16 - 1;\ + pIO->uiAccumulator = LOAD16(pIO->pbCurrent) << pIO->cBitsUsed;\ + return 0; +-// pIO->uiAccumulator = LOAD16(pIO->pbCurrent) & ((U32)(-1) >> pIO->cBitsUsed);\ + + void OutputPerfTimerReport(CWMImageStrCodec *pState); ++ ++#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_)) ++// WinCE ARM and Desktop x86 ++#else ++// other platform ++#ifdef _BIG__ENDIAN_ ++#define _byteswap_ulong(x) (x) ++#else // _BIG__ENDIAN_ ++U32 _byteswap_ulong(U32 bits); ++#endif // _BIG__ENDIAN_ ++#endif +\ No newline at end of file +--- jxrencoderdecoder/JxrDecApp.c 2013-05-08 18:45:08.000000000 +0200 ++++ jxrencoderdecoder/JxrDecApp.c 2015-09-03 10:30:31.019971779 +0200 +@@ -423,7 +423,7 @@ ERR WmpDecAppCreateEncoderFromExt( + Call(GetTestEncodeIID(szExt, &pIID)); + + // Create encoder +- Call(PKTestFactory_CreateCodec(pIID, ppIE)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppIE)); + + Cleanup: + return err; +--- jxrgluelib/JXRGlueJxr.c 2013-03-20 20:01:13.000000000 +0100 ++++ jxrgluelib/JXRGlueJxr.c 2015-09-03 10:30:31.021971818 +0200 +@@ -28,6 +28,7 @@ + //*@@@---@@@@****************************************************************** + #include + #include ++#include + + + static const char szHDPhotoFormat[] = "image/vnd.ms-photo"; +--- jxrtestlib/JXRTest.c 2013-03-19 20:06:18.000000000 +0100 ++++ jxrtestlib/JXRTest.c 2015-09-03 10:30:31.022971837 +0200 +@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile( + ERR err = WMP_errSuccess; + + char *pExt = NULL; +- PKIID* pIID = NULL; ++ const PKIID* pIID = NULL; + + struct WMPStream* pStream = NULL; + PKImageDecode* pDecoder = NULL; +@@ -214,7 +214,7 @@ ERR PKTestFactory_CreateDecoderFromFile( + Call(CreateWS_File(&pStream, szFilename, "rb")); + + // Create decoder +- Call(PKTestFactory_CreateCodec(pIID, ppDecoder)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppDecoder)); + pDecoder = *ppDecoder; + + // attach stream to decoder +@@ -232,7 +232,7 @@ ERR PKCreateTestFactory(PKCodecFactory** + + UNREFERENCED_PARAMETER( uVersion ); + +- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory))); ++ Call(PKAlloc((void**)ppCFactory, sizeof(**ppCFactory))); + pCFactory = *ppCFactory; + + pCFactory->CreateCodec = PKTestFactory_CreateCodec; +@@ -287,7 +287,7 @@ ERR PKTestDecode_Release( + + pID->fStreamOwner && pID->pStream->Close(&pID->pStream); + +- return PKFree(ppID); ++ return PKFree((void**)ppID); + } + + ERR PKTestDecode_Create( +@@ -296,7 +296,7 @@ ERR PKTestDecode_Create( + ERR err = WMP_errSuccess; + PKTestDecode* pID = NULL; + +- Call(PKAlloc(ppID, sizeof(**ppID))); ++ Call(PKAlloc((void**)ppID, sizeof(**ppID))); + + pID = *ppID; + pID->Initialize = PKTestDecode_Initialize; +--- jxrtestlib/JXRTestHdr.c 2013-03-20 17:40:08.000000000 +0100 ++++ jxrtestlib/JXRTestHdr.c 2015-09-03 10:30:31.022971837 +0200 +@@ -27,7 +27,7 @@ + //*@@@---@@@@****************************************************************** + #ifndef ANSI + #define _CRT_SECURE_NO_WARNINGS +-#endif ANSI ++#endif // ANSI + + #include + #include +--- jxrtestlib/JXRTestPnm.c 2013-03-19 22:43:44.000000000 +0100 ++++ jxrtestlib/JXRTestPnm.c 2015-09-03 10:30:31.023971856 +0200 +@@ -27,7 +27,7 @@ + //*@@@---@@@@****************************************************************** + #ifndef ANSI + #define _CRT_SECURE_NO_WARNINGS +-#endif ANSI ++#endif // ANSI + + #include + +--- jxrtestlib/JXRTestTif.c 2013-03-19 20:17:12.000000000 +0100 ++++ jxrtestlib/JXRTestTif.c 2015-09-03 10:30:31.023971856 +0200 +@@ -909,8 +909,8 @@ ERR PKImageDecode_Release_TIF(PKTestDeco + + PKTestDecode *pID = *ppID; + +- Call(WMPFree(&pID->EXT.TIF.uStripOffsets)); +- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripOffsets)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripByteCounts)); + + Call(PKTestDecode_Release(ppID)); + +--- image/sys/windowsmediaphoto.h 2019-03-03 17:25:20.300250000 -0500 ++++ image/sys/windowsmediaphoto.h 2019-03-03 17:43:28.765568000 -0500 +@@ -259,17 +259,15 @@ + + #define Call(exp) \ +- if (Failed(err = (exp))) \ ++ do if (Failed(err = (exp))) \ + { \ + Report(err, #exp, __FILE__, (long)__LINE__); \ + goto Cleanup; \ +- } \ +- else err = err ++ } while(0) + + #define CallIgnoreError(errTmp, exp) \ +- if (Failed(errTmp = (exp))) \ ++ do if (Failed(errTmp = (exp))) \ + { \ + Report(errTmp, #exp, __FILE__, (long)__LINE__); \ +- } \ +- else errTmp = errTmp ++ } while (0) + +