[haiku-commits] haiku: hrev53418 - in src: add-ons/kernel/network/ppp/shared/libkernelppp add-ons/accelerants/neomagic/engine apps/debuganalyzer/gui apps/debuganalyzer apps/debuganalyzer/gui/main_window

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 30 Aug 2019 10:03:00 -0400 (EDT)

hrev53418 adds 7 changesets to branch 'master'
old head: 178d693469458376765a10cd5d7c945279fa05c6
new head: ecba909c8ce258df90744f9845b0ffecb15fb896
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=ecba909c8ce2+%5E178d69346945

----------------------------------------------------------------------------

af47fc80f917: KPPPInterface.cpp: Fix missing autolocker variable name
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I2eb8211477568e3b34e4b9eff5efa5c84c540ccd
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1757
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

e7742a11bd3a: neomagic: Use uintptr_t instead of uint32_t for type casts
  
  This fixes 64-bit build with modern GCC
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: Ifaa719d8ec45f021cf01320df9639d4f8a03c957
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1758
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

47d568796d3b: KPPPInterface.cpp: Fix GCC error
  
  src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp: In
  member function 'void KPPPInterface::CalculateBaudRate()':
  src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp:2018:4:
  error: this 'if' clause does not guard...
  [-Werror=misleading-indentation]
      if (ChildAt(index)->Ifnet())
      ^~
  src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp:2020:5:
  note: ...this statement, but the latter is misleadingly indented as if
  it were guarded by the 'if'
       return;
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I8790a8ea3a961d73073b295ac438f3c60c16fcba
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1759
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

7e66a28740b8: libkernelppp: Use arpa/inet.h for htons macros
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I6a9c8ef664d266b4d720fcf85525e73d82e6bd43
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1760
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

8965d4ab784c: DebugAnalyzer.cpp: Fix catch of polymorphic exception by value
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I580dafec7fa0ab038b394f50a5a5131b86711cde
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1761
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

4f77a907ba4d: debuganalyzer: Fix catch of polymorphic object by value
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I1290a313905d3d940532c7c1626a631bf70afb29
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1762
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

ecba909c8ce2: playwav.cpp: Fix function conflict
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I196e05fb351308851c6568a38cadeae2e20697ee
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1763
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                   [ Jaroslaw Pelczar <jarek@xxxxxxxxxxxx> ]

----------------------------------------------------------------------------

9 files changed, 16 insertions(+), 12 deletions(-)
src/add-ons/accelerants/neomagic/engine/nm_bes.c          |  4 ++--
src/add-ons/accelerants/neomagic/engine/nm_crtc.c         |  2 +-
.../ppp/shared/libkernelppp/KPPPConfigurePacket.cpp       |  2 ++
.../network/ppp/shared/libkernelppp/KPPPInterface.cpp     | 11 +++++++----
.../network/ppp/shared/libkernelppp/KPPPStateMachine.cpp  |  1 +
src/apps/debuganalyzer/DebugAnalyzer.cpp                  |  2 +-
src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h      |  2 +-
src/apps/debuganalyzer/gui/main_window/MainWindow.cpp     |  2 +-
src/tests/kits/media/playwav/playwav.cpp                  |  2 --

############################################################################

Commit:      af47fc80f917bff4a611541972c3aef0e079b4aa
URL:         https://git.haiku-os.org/haiku/commit/?id=af47fc80f917
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:43:02 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:02:35 2019 UTC

KPPPInterface.cpp: Fix missing autolocker variable name

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I2eb8211477568e3b34e4b9eff5efa5c84c540ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1757
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git 
a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp 
b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
index eeac769ce8..b42207be60 100644
--- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
+++ b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
@@ -261,7 +261,7 @@ KPPPInterface::~KPPPInterface()
        while (true) {
                Down();
                {
-                       MutexLocker (fLock);
+                       MutexLocker locker(fLock);
                        if (State() == PPP_INITIAL_STATE && Phase() == 
PPP_DOWN_PHASE)
                                break;
                }

############################################################################

Commit:      e7742a11bd3a8f635856364de849a5e4caf1058b
URL:         https://git.haiku-os.org/haiku/commit/?id=e7742a11bd3a
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:43:29 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:02:35 2019 UTC

neomagic: Use uintptr_t instead of uint32_t for type casts

This fixes 64-bit build with modern GCC

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: Ifaa719d8ec45f021cf01320df9639d4f8a03c957
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1758
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/neomagic/engine/nm_bes.c 
b/src/add-ons/accelerants/neomagic/engine/nm_bes.c
index 0f2f7080d2..2141a9d60d 100644
--- a/src/add-ons/accelerants/neomagic/engine/nm_bes.c
+++ b/src/add-ons/accelerants/neomagic/engine/nm_bes.c
@@ -242,8 +242,8 @@ static void nm_bes_calc_move_overlay(move_overlay_info *moi)
         *******************************/
 
        /* calculate inputbitmap origin adress */
-       moi->a1orgv = (uint32)((vuint32 *)si->overlay.ob.buffer);
-       moi->a1orgv -= (uint32)((vuint32 *)si->framebuffer);
+       moi->a1orgv = (uintptr_t)((vuint32 *)si->overlay.ob.buffer);
+       moi->a1orgv -= (uintptr_t)((vuint32 *)si->framebuffer);
        LOG(4,("Overlay: topleft corner of input bitmap (cardRAM offset) 
$%08x\n", moi->a1orgv));
 
        /* Setup vertical source start: first (sub)pixel contributing to output 
picture. */
diff --git a/src/add-ons/accelerants/neomagic/engine/nm_crtc.c 
b/src/add-ons/accelerants/neomagic/engine/nm_crtc.c
index 42d65b33b7..b8437676d8 100644
--- a/src/add-ons/accelerants/neomagic/engine/nm_crtc.c
+++ b/src/add-ons/accelerants/neomagic/engine/nm_crtc.c
@@ -955,7 +955,7 @@ status_t nm_crtc_cursor_init()
        nm_crtc_depth(BPP8);
 
        /* clear cursor: so we need full RAM access! */
-       fb = ((vuint32 *)(((uint32)si->framebuffer) + curadd));
+       fb = ((vuint32 *)(((uintptr_t)si->framebuffer) + curadd));
        for (i = 0; i < (1024/4); i++)
        {
                fb[i] = 0;

############################################################################

Commit:      47d568796d3b352bd1789caa29416b779df8c641
URL:         https://git.haiku-os.org/haiku/commit/?id=47d568796d3b
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:44:01 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:02:35 2019 UTC

KPPPInterface.cpp: Fix GCC error

src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp: In
member function 'void KPPPInterface::CalculateBaudRate()':
src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp:2018:4:
error: this 'if' clause does not guard...
[-Werror=misleading-indentation]
    if (ChildAt(index)->Ifnet())
    ^~
src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp:2020:5:
note: ...this statement, but the latter is misleadingly indented as if
it were guarded by the 'if'
     return;

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I8790a8ea3a961d73073b295ac438f3c60c16fcba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1759
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git 
a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp 
b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
index b42207be60..cdb6e9809c 100644
--- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
+++ b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
@@ -2013,10 +2013,12 @@ KPPPInterface::CalculateBaudRate()
                Device()->OutputTransferRate());
        else {
                fIfnet->link_speed = 0;
-               for (int32 index = 0; index < CountChildren(); index++)
-                       if (ChildAt(index)->Ifnet())
-                               fIfnet->link_speed += 
ChildAt(index)->Ifnet()->link_speed;
+               for (int32 index = 0; index < CountChildren(); index++) {
+                       if (ChildAt(index)->Ifnet()) {
+                               fIfnet->link_speed = 
ChildAt(index)->Ifnet()->link_speed;
                                return;
+                       }
+               }
        }
 }
 

############################################################################

Commit:      7e66a28740b80bf87c3f91cbb9b7b58ff4ef7f0e
URL:         https://git.haiku-os.org/haiku/commit/?id=7e66a28740b8
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:44:20 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:02:35 2019 UTC

libkernelppp: Use arpa/inet.h for htons macros

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I6a9c8ef664d266b4d720fcf85525e73d82e6bd43
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1760
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git 
a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPConfigurePacket.cpp 
b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPConfigurePacket.cpp
index 82207eb092..e9424ea9a0 100644
--- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPConfigurePacket.cpp
+++ b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPConfigurePacket.cpp
@@ -16,6 +16,8 @@
 #include <KPPPConfigurePacket.h>
 #include <KPPPInterface.h>
 
+#include <arpa/inet.h>
+
 
 /*!    \brief Constructor.
 
diff --git 
a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp 
b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
index cdb6e9809c..d5ba448dfc 100644
--- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
+++ b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp
@@ -23,6 +23,7 @@
 // void (KernelExport.h) and once with int (stdio.h).
 #include <cstdio>
 #include <cstring>
+#include <arpa/inet.h>
 
 #include <ByteOrder.h>
 #include <net_buffer.h>
diff --git 
a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp 
b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp
index 181110ce58..04f7700b7f 100644
--- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp
+++ b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp
@@ -22,6 +22,7 @@
 #include <KPPPUtils.h>
 
 #include <net/if.h>
+#include <arpa/inet.h>
 
 #include <ByteOrder.h>
 #include <net_buffer.h>

############################################################################

Commit:      8965d4ab784ca5a7657ec1b17081120a1a77f8cf
URL:         https://git.haiku-os.org/haiku/commit/?id=8965d4ab784c
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:50:05 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:02:35 2019 UTC

DebugAnalyzer.cpp: Fix catch of polymorphic exception by value

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I580dafec7fa0ab038b394f50a5a5131b86711cde
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1761
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/apps/debuganalyzer/DebugAnalyzer.cpp 
b/src/apps/debuganalyzer/DebugAnalyzer.cpp
index b66c318ad5..29a9069f9e 100644
--- a/src/apps/debuganalyzer/DebugAnalyzer.cpp
+++ b/src/apps/debuganalyzer/DebugAnalyzer.cpp
@@ -79,7 +79,7 @@ private:
                MainWindow* window;
                try {
                        window = new MainWindow(dataSource);
-               } catch (std::bad_alloc) {
+               } catch (std::bad_alloc&) {
                        fprintf(stderr, "DebugAnalyzer::_CreateWindow(): Out of 
memory!\n");
                        return B_NO_MEMORY;
                }

############################################################################

Commit:      4f77a907ba4dac8024f6d3d79dcd32c9d9625f6b
URL:         https://git.haiku-os.org/haiku/commit/?id=4f77a907ba4d
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:55:42 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:02:35 2019 UTC

debuganalyzer: Fix catch of polymorphic object by value

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I1290a313905d3d940532c7c1626a631bf70afb29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1762
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h 
b/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h
index 3b6ab1a7ae..7a55e04219 100644
--- a/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h
+++ b/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h
@@ -528,7 +528,7 @@ ABSTRACT_WAIT_OBJECTS_PAGE_CLASS::_UpdateTreeModel()
                try {
                        fWaitObjectsTreeModel = new WaitObjectsTreeModel(fModel,
                                fGroupByName);
-               } catch (std::bad_alloc) {
+               } catch (std::bad_alloc&) {
                        // TODO: Report error!
                }
                fWaitObjectsTree->SetTreeTableModel(fWaitObjectsTreeModel);
diff --git a/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp 
b/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp
index 57b4bac047..767e7d9d32 100644
--- a/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp
+++ b/src/apps/debuganalyzer/gui/main_window/MainWindow.cpp
@@ -177,7 +177,7 @@ MainWindow::OpenThreadWindow(Model::Thread* thread)
        // window doesn't exist yet -- create it
        try {
                window = new ThreadWindow(fSubWindowManager, fModel, thread);
-       } catch (std::bad_alloc) {
+       } catch (std::bad_alloc&) {
                // TODO: Report error!
        }
 

############################################################################

Revision:    hrev53418
Commit:      ecba909c8ce258df90744f9845b0ffecb15fb896
URL:         https://git.haiku-os.org/haiku/commit/?id=ecba909c8ce2
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:56:35 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:02:35 2019 UTC

playwav.cpp: Fix function conflict

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I196e05fb351308851c6568a38cadeae2e20697ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1763
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/tests/kits/media/playwav/playwav.cpp 
b/src/tests/kits/media/playwav/playwav.cpp
index 7a0e650e9f..4ce6b2c3fb 100644
--- a/src/tests/kits/media/playwav/playwav.cpp
+++ b/src/tests/kits/media/playwav/playwav.cpp
@@ -22,8 +22,6 @@ sem_id finished = -1;
 int fd = -1;
 NAMESPACE BSoundPlayer *sp = 0;
 
-inline float abs(float f) { return f < 0 ? -f : f; }
-
 void PlayBuffer(void *cookie, void * buffer, size_t size, const 
media_raw_audio_format & format)
 {
        size_t portsize = port_buffer_size(port);


Other related posts:

  • » [haiku-commits] haiku: hrev53418 - in src: add-ons/kernel/network/ppp/shared/libkernelppp add-ons/accelerants/neomagic/engine apps/debuganalyzer/gui apps/debuganalyzer apps/debuganalyzer/gui/main_window - waddlesplash