[vlc-commits] [Git][videolan/vlc][master] contrib: salsa: fix wrong cast

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Nov 17 06:41:28 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
c27a6a57 by Steve Lhomme at 2022-11-17T05:45:16+00:00
contrib: salsa: fix wrong cast

The code has been submitted upstream [1], but no feedback so far.

[1] https://github.com/tiwai/salsa-lib/pull/2

- - - - -


2 changed files:

- contrib/src/salsa/rules.mak
- + contrib/src/salsa/salsa-cast-fix.patch


Changes:

=====================================
contrib/src/salsa/rules.mak
=====================================
@@ -23,6 +23,7 @@ $(TARBALLS)/salsa-lib-$(SALSA_TAG).tar.xz:
 
 salsa-lib: salsa-lib-$(SALSA_TAG).tar.xz .sum-salsa
 	$(UNPACK)
+	$(APPLY) $(SRC)/salsa/salsa-cast-fix.patch
 	$(MOVE)
 
 .salsa: salsa-lib


=====================================
contrib/src/salsa/salsa-cast-fix.patch
=====================================
@@ -0,0 +1,29 @@
+From 0c83bfa7ddc13efa2160a8d6f2d081818ed5d6af Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Fri, 25 Feb 2022 09:37:13 +0100
+Subject: [PATCH] fix invalid cast
+
+I get this error when compiling
+
+```
+error: assignment to 'snd_config_t **' {aka 'struct _snd_config **'} from incompatible pointer type 'snd_config_t *' {aka 'struct _snd_config *'} [-Werror=incompatible-pointer-types]
+|         top = (snd_config_t*)1;
+|             ^
+```
+---
+ src/conf.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/conf.h b/src/conf.h
+index 56858e7..2603d93 100644
+--- a/src/conf.h
++++ b/src/conf.h
+@@ -69,7 +69,7 @@ __SALSA_EXPORT_FUNC
+ int snd_config_update_ref(snd_config_t **top)
+ {
+ 	/* an invalid address, but just mark to be non-NULL */
+-	top = (snd_config_t*)1;
++	*top = (snd_config_t*)1;
+ 	snd_config_update();
+ 	return 0;
+ }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c27a6a579643dc5997592111fca316d8c9512c85

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c27a6a579643dc5997592111fca316d8c9512c85
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list