[libdvdnav-devel] nav_print: Remove printing bogus value for vobu_uop_ctl

Diego Biurrun git at videolan.org
Fri Jan 3 00:00:56 CET 2014


libdvdread | branch: master | Diego Biurrun <diego at biurrun.de> | Thu Jan  2 22:27:12 2014 +0100| [d2b625a00b4f97b37bf790da314535b825a74e61] | committer: Diego Biurrun

nav_print: Remove printing bogus value for vobu_uop_ctl

navPrint_PCI_GI() prints the values of a pci_gi_t struct, but for the embedded
user_ops_t substruct it just prints the first 32 bytes by pointer type punning.
Given that the latter is a large struct with members of system-dependent sizes
the result of this operation is often enough just a random value, so drop
printing the value altogether.

src/nav_print.c:39:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=d2b625a00b4f97b37bf790da314535b825a74e61
---

 src/nav_print.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/src/nav_print.c b/src/nav_print.c
index e224222..2d9e6b2 100644
--- a/src/nav_print.c
+++ b/src/nav_print.c
@@ -36,7 +36,6 @@ static void navPrint_PCI_GI(pci_gi_t *pci_gi) {
   printf("pci_gi:\n");
   printf("nv_pck_lbn    0x%08x\n", pci_gi->nv_pck_lbn);
   printf("vobu_cat      0x%04x\n", pci_gi->vobu_cat);
-  printf("vobu_uop_ctl  0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl);
   printf("vobu_s_ptm    0x%08x\n", pci_gi->vobu_s_ptm);
   printf("vobu_e_ptm    0x%08x\n", pci_gi->vobu_e_ptm);
   printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm);



More information about the libdvdnav-devel mailing list