Ticket #23230: 0001-Bug-23230-Fix-build-error-on-Windows-64.patch

File 0001-Bug-23230-Fix-build-error-on-Windows-64.patch, 1.7 KB (added by boklm, 20 months ago)
  • media/libcubeb/src/cubeb_wasapi.cpp

    From 554d86d7d285191ea44aa9decf785e9e5d4e20f4 Mon Sep 17 00:00:00 2001
    From: Nicolas Vigier <boklm@torproject.org>
    Date: Sat, 12 Aug 2017 20:42:59 +0200
    Subject: [PATCH 1/2] Bug 23230: Fix build error on Windows 64
    
    Fix the following build error we have when building for Windows 64:
    /var/tmp/build/firefox-af0ca6a886c7/media/libcubeb/src/cubeb_wasapi.cpp:1596:46:
      error: cast from cubeb_devid {aka void*} to int loses precision
     [-fpermissive]
    
    We fix that by using %p instead of %x to remove the need for a cast.
    ---
     media/libcubeb/src/cubeb_wasapi.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/media/libcubeb/src/cubeb_wasapi.cpp b/media/libcubeb/src/cubeb_wasapi.cpp
    index e88d6be..212cc26 100644
    a b int setup_wasapi_stream(cubeb_stream * stm) 
    15751575  XASSERT((!stm->output_client || !stm->input_client) && "WASAPI stream already setup, close it first.");
    15761576
    15771577  if (has_input(stm)) {
    1578     LOG("Setup capture: device=%x", (int)stm->input_device);
     1578    LOG("Setup capture: device=%p", stm->input_device);
    15791579    rv = setup_wasapi_stream_one_side(stm,
    15801580                                      &stm->input_stream_params,
    15811581                                      stm->input_device,
    int setup_wasapi_stream(cubeb_stream * stm) 
    15931593  }
    15941594
    15951595  if (has_output(stm)) {
    1596     LOG("Setup render: device=%x", (int)stm->output_device);
     1596    LOG("Setup render: device=%p", stm->output_device);
    15971597    rv = setup_wasapi_stream_one_side(stm,
    15981598                                      &stm->output_stream_params,
    15991599                                      stm->output_device,