From nobody Sun Feb 12 11:59:48 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF5ch4gXWz3pFXD; Sun, 12 Feb 2023 11:59:48 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF5ch4CsFz42vf; Sun, 12 Feb 2023 11:59:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676203188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxTMzeT3Hci+n7cH40MAeksHAHxDUTeq2BaOndmVyMI=; b=R0jHvjspzWKITRQXgr0ZFaRZcyfpHTdLvCQo+WdZvyKHK4asmyXwTU4vsMejcjrtaYGc2x Mwvx+uDnBelfNTX/sa8ub+GfU2gminj8/iZqHEElkxX+ZkmgsTFWrMwCV4hVaQ4VuaFIMH KVDUdEGmy7OYlCUg7Au0b3PYnkg5rwV3sxtV7W1N9XQ/fjVM3T2270VkdYpLX0FRqt1GOM XxefNPSQwE3wlsQkT3pEGEU+ud2eTI+zPctftJfMnNATVku57qYABMCIRaEk5jPEyDTwGf ftOiIMaT1K5zUULOuLCjKBddTqGPGCmxaNvceypxj6UGEMFahYXMeW+tbT87ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676203188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxTMzeT3Hci+n7cH40MAeksHAHxDUTeq2BaOndmVyMI=; b=FtJ58qTtllhZDtz6eXpJDAT7h6MxIomAZ2NEtVHnGo2Coc8oVT/Z4rqKybGb/ViuvduXpu Z2mb6UtNKaYTJeQPAEwXT86qlmIRAVnU5tc4A2sY1mwYiC0F3cgIO00VEoFXQTU0rmVV/q gdPE2eG/frp/lwLqy2TjRco9O+eMyrGYwggOBsdNcJS4wbS3aElOFr9FIOGzyO85jrvSut q64JxWYmMbYUy9KGqelJZTt3At2Ss5JfFATvNeJ9Bh5RpuuZN6c/qOKBuqeKyjHez0gya6 NMR6whyXobMl9WFpXdym47tMmfhUG/e4l/MrFf6kgBu51aYHePR6DYZHfA0ykw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676203188; a=rsa-sha256; cv=none; b=BCZPgauXtZ3fpCIY9fAtPCPXT46aBooo3QuGVHPXmjUmUrbe0yUgnYfzRiK5OI3aNz4DUy p+/4+QaI+VrpYyWnC15Ph11NIUaFVzSkq22Wz9b+O9nlaJeoc1CSq9+tdjjgr5nLl136fW yCtXSqfsEgl+mqPiU8euTvnKZPickJMcU2a0cdbSs/M8QJ9IkJ2e9BMBXfiQl23FMtzmXc lVR3JVEc86b1fC0LSEZvMTefyqdxaRg9kg7iGnAkw2krT85/75T66W/KPuzdQT9Jx2skeP mXLebDpIVjEqkOkjVIw8jrMgYXRT0CWK/dQnPQwYFgWbTLa4GyotuKZPE96cuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PF5ch38QpzdH2; Sun, 12 Feb 2023 11:59:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31CBxmDL010781; Sun, 12 Feb 2023 11:59:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CBxmci010780; Sun, 12 Feb 2023 11:59:48 GMT (envelope-from git) Date: Sun, 12 Feb 2023 11:59:48 GMT Message-Id: <202302121159.31CBxmci010780@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Thomas Zander Subject: git: d8b84fe7c9c4 - main - multimedia/mplayer: Fix build with llvm15 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: riggs X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8b84fe7c9c4ac81c77f67e941b27bfd51bb3678 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by riggs: URL: https://cgit.FreeBSD.org/ports/commit/?id=d8b84fe7c9c4ac81c77f67e941b27bfd51bb3678 commit d8b84fe7c9c4ac81c77f67e941b27bfd51bb3678 Author: Thomas Zander AuthorDate: 2023-02-12 11:00:38 +0000 Commit: Thomas Zander CommitDate: 2023-02-12 11:59:46 +0000 multimedia/mplayer: Fix build with llvm15 Details: - clang15 performs stricter checks for pointer conversions, some questionable conversions graduated from warnings to errors - Fixes multimedia/mencoder builds as well MFH: 2023Q1 --- .../mplayer/files/patch-libmpcodecs_ve__lavc.c | 11 ++++ multimedia/mplayer/files/patch-loader_ext.c | 11 ++++ multimedia/mplayer/files/patch-loader_module.c | 20 +++++++ multimedia/mplayer/files/patch-loader_win32.c | 66 ++++++++++++++++++++++ 4 files changed, 108 insertions(+) diff --git a/multimedia/mplayer/files/patch-libmpcodecs_ve__lavc.c b/multimedia/mplayer/files/patch-libmpcodecs_ve__lavc.c new file mode 100644 index 000000000000..e0bd7ef69167 --- /dev/null +++ b/multimedia/mplayer/files/patch-libmpcodecs_ve__lavc.c @@ -0,0 +1,11 @@ +--- libmpcodecs/ve_lavc.c.orig 2022-08-30 20:40:03 UTC ++++ libmpcodecs/ve_lavc.c +@@ -441,7 +441,7 @@ static int config(struct vf_instance *vf, + mp_msg(MSGT_MENCODER,MSGL_ERR,"error parsing vrc_q\n"); + return 0; + } +- lavc_venc_context->rc_override= ++ lavc_venc_context->rc_override=(struct RcOverride *) + av_reallocp_array(lavc_venc_context->rc_override, i+1, sizeof(*lavc_venc_context->rc_override)); + lavc_venc_context->rc_override[i].start_frame= start; + lavc_venc_context->rc_override[i].end_frame = end; diff --git a/multimedia/mplayer/files/patch-loader_ext.c b/multimedia/mplayer/files/patch-loader_ext.c new file mode 100644 index 000000000000..8bddcf64f602 --- /dev/null +++ b/multimedia/mplayer/files/patch-loader_ext.c @@ -0,0 +1,11 @@ +--- loader/ext.c.orig 2021-01-23 18:22:09 UTC ++++ loader/ext.c +@@ -444,7 +444,7 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, + + if (type&MEM_RESERVE && (unsigned)address&0xffff) { + size += (unsigned)address&0xffff; +- address = (unsigned)address&~0xffff; ++ address = (void*)((unsigned)address&~0xffff); + } + pgsz = sysconf(_SC_PAGESIZE); + if (type&MEM_COMMIT && (unsigned)address%pgsz) { diff --git a/multimedia/mplayer/files/patch-loader_module.c b/multimedia/mplayer/files/patch-loader_module.c new file mode 100644 index 000000000000..bcdeabbe3ba8 --- /dev/null +++ b/multimedia/mplayer/files/patch-loader_module.c @@ -0,0 +1,20 @@ +--- loader/module.c.orig 2011-07-30 20:44:37 UTC ++++ loader/module.c +@@ -844,7 +844,7 @@ static int report_func(void *stack_base, int stack_siz + // memory management: + case 0x150011: //NewPtrClear + case 0x150012: //NewPtrSysClear +- reg->eax = malloc(((uint32_t *)stack_base)[1]); ++ reg->eax = (uint32_t)malloc(((uint32_t *)stack_base)[1]); + memset((void *)reg->eax,0,((uint32_t *)stack_base)[1]); + #ifdef DEBUG_QTX_API + printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); +@@ -852,7 +852,7 @@ static int report_func(void *stack_base, int stack_siz + return 1; + case 0x15000F: //NewPtr + case 0x150010: //NewPtrSys +- reg->eax = malloc(((uint32_t *)stack_base)[1]); ++ reg->eax = (uint32_t)malloc(((uint32_t *)stack_base)[1]); + #ifdef DEBUG_QTX_API + printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); + #endif diff --git a/multimedia/mplayer/files/patch-loader_win32.c b/multimedia/mplayer/files/patch-loader_win32.c new file mode 100644 index 000000000000..604d4e35c657 --- /dev/null +++ b/multimedia/mplayer/files/patch-loader_win32.c @@ -0,0 +1,66 @@ +--- loader/win32.c.orig 2021-01-23 18:22:09 UTC ++++ loader/win32.c +@@ -1504,7 +1504,7 @@ static void WINAPI expDeleteCriticalSection(CRITICAL_S + static int WINAPI expGetCurrentThreadId(void) + { + dbgprintf("GetCurrentThreadId() => %d\n", pthread_self()); +- return pthread_self(); ++ return (int)pthread_self(); + } + static int WINAPI expGetCurrentProcess(void) + { +@@ -2019,15 +2019,15 @@ static DWORD WINAPI expSignalObjectAndWait(HANDLE hObj + expSetEvent(mlist); + break; + case 1: // Semaphore +- expReleaseSemaphore(mlist, 1, NULL); ++ expReleaseSemaphore((long)mlist, 1, NULL); + break; + case 2: // Mutex +- expReleaseMutex(mlist); ++ expReleaseMutex((long)mlist); + break; + default: + dbgprintf("Signalling unknown object type %d!\n", hObjectToSignal); + } +- return expWaitForSingleObject(hObjectToWaitOn, dwMilliseconds); ++ return (DWORD)expWaitForSingleObject((void*)hObjectToWaitOn, dwMilliseconds); + } + + static long WINAPI expRegOpenKeyExA(long key, const char* subkey, long reserved, long access, int* newkey) +@@ -2751,7 +2751,7 @@ static int WINAPI expEnumDisplayMonitors(void *dc, REC + { + dbgprintf("EnumDisplayMonitors(0x%x, 0x%x, 0x%x, 0x%x) => ?\n", + dc, r, callback_proc, callback_param); +- return callback_proc(0, dc, r, callback_param); ++ return callback_proc(0, (HDC)dc, r, (LPARAM)callback_param); + } + + #if 0 +@@ -2851,14 +2851,14 @@ static int WINAPI expEnumWindows(int (*callback_func)( + { + int i, i2; + dbgprintf("EnumWindows(0x%x, 0x%x) => 1\n", callback_func, callback_param); +- i = callback_func(0, callback_param); +- i2 = callback_func(1, callback_param); ++ i = callback_func(0, (LPARAM)callback_param); ++ i2 = callback_func(1, (LPARAM)callback_param); + return i && i2; + } + + static int WINAPI expGetWindowThreadProcessId(HWND win, int *pid_data) + { +- int tid = pthread_self(); ++ int tid = (int)pthread_self(); + dbgprintf("GetWindowThreadProcessId(0x%x, 0x%x) => %d\n", + win, pid_data, tid); + if (pid_data) +@@ -4940,7 +4940,7 @@ static HPALETTE WINAPI expCreatePalette(CONST LOGPALET + dbgprintf("CreatePalette(%x) => NULL\n", lpgpl); + + i = sizeof(LOGPALETTE)+((lpgpl->palNumEntries-1)*sizeof(PALETTEENTRY)); +- test = malloc(i); ++ test = (HPALETTE)malloc(i); + memcpy((void *)test, lpgpl, i); + + return test;