[haiku-commits] haiku: hrev52591 - in src: apps/deskbar kits/tracker system/kernel kits/interface servers/app/stackandtile

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 25 Nov 2018 01:05:35 -0500 (EST)

hrev52591 adds 3 changesets to branch 'master'
old head: 766872a8723090a862460cd315dcd84dd6284ef3
new head: ef593f61a261ce8f9f43c0fd6f7ee7de3dcdbe48
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=ef593f61a261+%5E766872a87230

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

df4074fbed09: Remove a lot of unused constants.
  
  Spotted by Clang. No functional change intended.

aa0836519a28: kernel: thread->name is never NULL as it is an array.
  
  Spotted by Clang (-Wtautological-pointer-compare.)

ef593f61a261: ELF: Ignore PT_EH_FRAME and PT_STACK.
  
  This allows Clang builds (linked with our cross binutils) to
  at least start runtime_loader and then try to load launch_daemon.
  That fails with an infinite loop somewhere...

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

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

20 files changed, 12 insertions(+), 46 deletions(-)
headers/os/kernel/elf.h                        |  1 +
src/apps/deskbar/BarView.cpp                   |  1 -
src/apps/deskbar/PreferencesWindow.cpp         |  1 -
src/apps/deskbar/ShowHideMenuItem.cpp          |  1 -
src/apps/deskbar/TimeView.cpp                  |  1 -
src/apps/deskbar/WindowMenu.cpp                | 12 ++----------
src/kits/game/FileGameSound.cpp                |  6 ++----
src/kits/interface/MenuItem.cpp                |  3 ---
src/kits/interface/TextView.cpp                |  1 -
src/kits/package/hpkg/ReaderImplBase.cpp       |  2 --
src/kits/tracker/FindPanel.cpp                 |  8 +-------
src/kits/tracker/TaskLoop.cpp                  |  2 --
src/kits/tracker/TrackerInitialState.cpp       |  1 -
src/servers/app/decorator/DefaultDecorator.cpp |  1 -
src/servers/app/stackandtile/SATDecorator.cpp  |  3 ---
src/servers/app/stackandtile/Stacking.cpp      |  7 ++-----
src/servers/keystore/StripeView.cpp            |  1 -
src/system/kernel/elf.cpp                      |  1 +
src/system/kernel/thread.cpp                   |  3 +--
src/system/runtime_loader/elf_load_image.cpp   |  2 ++

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

Commit:      df4074fbed092b09474695aa286752ca41625332
URL:         https://git.haiku-os.org/haiku/commit/?id=df4074fbed09
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sun Nov 25 00:21:16 2018 UTC

Remove a lot of unused constants.

Spotted by Clang. No functional change intended.

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

diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp
index 526fa996d2..c362e04e4d 100644
--- a/src/apps/deskbar/BarView.cpp
+++ b/src/apps/deskbar/BarView.cpp
@@ -61,7 +61,6 @@ All rights reserved.
 
 
 const int32 kDefaultRecentDocCount = 10;
-const int32 kDefaultRecentFolderCount = 10;
 const int32 kDefaultRecentAppCount = 10;
 
 const int32 kMenuTrackMargin = 20;
diff --git a/src/apps/deskbar/PreferencesWindow.cpp 
b/src/apps/deskbar/PreferencesWindow.cpp
index 99f9035578..e007ee68c6 100644
--- a/src/apps/deskbar/PreferencesWindow.cpp
+++ b/src/apps/deskbar/PreferencesWindow.cpp
@@ -37,7 +37,6 @@
 #include "StatusView.h"
 
 
-static const uint32 kSettingsViewChanged = 'Svch';
 static const char* kSettingsFileName = "prefs_window_settings";
 
 
diff --git a/src/apps/deskbar/ShowHideMenuItem.cpp 
b/src/apps/deskbar/ShowHideMenuItem.cpp
index 28f7a09f7b..2568ae9b9c 100644
--- a/src/apps/deskbar/ShowHideMenuItem.cpp
+++ b/src/apps/deskbar/ShowHideMenuItem.cpp
@@ -44,7 +44,6 @@ All rights reserved.
 #include "tracker_private.h"
 
 
-const int32    kDesktopWindow = 4;
 const float kHPad = 10.0f;
 const float kVPad = 2.0f;
 
diff --git a/src/apps/deskbar/TimeView.cpp b/src/apps/deskbar/TimeView.cpp
index 5ea67ea13b..af13ce9294 100644
--- a/src/apps/deskbar/TimeView.cpp
+++ b/src/apps/deskbar/TimeView.cpp
@@ -56,7 +56,6 @@ All rights reserved.
 #include "CalendarMenuWindow.h"
 
 
-static const char* const kMinString = "99:99 AM";
 static const float kHMargin = 2.0;
 
 
diff --git a/src/apps/deskbar/WindowMenu.cpp b/src/apps/deskbar/WindowMenu.cpp
index bbd2673dc8..8d1781a37c 100644
--- a/src/apps/deskbar/WindowMenu.cpp
+++ b/src/apps/deskbar/WindowMenu.cpp
@@ -47,15 +47,7 @@ All rights reserved.
 #include "TeamMenuItem.h"
 #include "tracker_private.h"
 #include "WindowMenuItem.h"
-
-
-const int32 kDesktopWindow = 1024;
-const int32 kMenuWindow        = 1025;
-const uint32 kWindowScreen = 1026;
-const uint32 kNormalWindow = 0;
-const int32 kTeamFloater = 4;
-const int32 kListFloater = 5;
-const int32 kSystemFloater = 6;
+#include "WindowPrivate.h"
 
 
 #undef B_TRANSLATION_CONTEXT
@@ -68,7 +60,7 @@ const int32 kSystemFloater = 6;
 bool
 TWindowMenu::WindowShouldBeListed(client_window_info* info)
 {
-       return ((info->feel == kNormalWindow || info->feel == kWindowScreen)
+       return ((info->feel == B_NORMAL_WINDOW_FEEL || info->feel == 
kWindowScreenFeel)
                        // Window has the right feel
                && info->show_hide_level <= 0);
                        // Window is not hidden
diff --git a/src/kits/game/FileGameSound.cpp b/src/kits/game/FileGameSound.cpp
index bd7ad2d3ef..daf5063a5a 100644
--- a/src/kits/game/FileGameSound.cpp
+++ b/src/kits/game/FileGameSound.cpp
@@ -22,9 +22,7 @@
 #include "GSUtility.h"
 
 
-const int32 kPages = 20;
-struct _gs_media_tracker
-{
+struct _gs_media_tracker {
        BMediaFile*     file;
        BMediaTrack*    stream;
        int64           frames;
@@ -384,7 +382,7 @@ BFileGameSound::Init(const entry_ref* file)
                fAudioStream = NULL;
                return B_NO_MEMORY;
        }
-       
+
        status_t error = fAudioStream->file->InitCheck();
        if (error != B_OK)
                return error;
diff --git a/src/kits/interface/MenuItem.cpp b/src/kits/interface/MenuItem.cpp
index 2d49398c01..7e1a982d19 100644
--- a/src/kits/interface/MenuItem.cpp
+++ b/src/kits/interface/MenuItem.cpp
@@ -27,9 +27,6 @@
 #include "utf8_functions.h"
 
 
-const float kLightBGTint
-       = (B_LIGHTEN_1_TINT + B_LIGHTEN_1_TINT + B_NO_TINT) / 3.0;
-
 // map control key shortcuts to drawable Unicode characters
 // cf. http://unicode.org/charts/PDF/U2190.pdf
 const char* kUTF8ControlMap[] = {
diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp
index 952e29cba0..6dcebadc9b 100644
--- a/src/kits/interface/TextView.cpp
+++ b/src/kits/interface/TextView.cpp
@@ -188,7 +188,6 @@ struct BTextView::LayoutData {
 };
 
 
-static const rgb_color kBlackColor = { 0, 0, 0, 255 };
 static const rgb_color kBlueInputColor = { 152, 203, 255, 255 };
 static const rgb_color kRedInputColor = { 255, 152, 152, 255 };
 
diff --git a/src/kits/package/hpkg/ReaderImplBase.cpp 
b/src/kits/package/hpkg/ReaderImplBase.cpp
index c4e4978c15..612e132134 100644
--- a/src/kits/package/hpkg/ReaderImplBase.cpp
+++ b/src/kits/package/hpkg/ReaderImplBase.cpp
@@ -35,8 +35,6 @@ namespace BHPKG {
 namespace BPrivate {
 
 
-static const size_t kScratchBufferSize = 64 * 1024;
-
 static const uint16 kAttributeTypes[B_HPKG_ATTRIBUTE_ID_ENUM_COUNT] = {
        #define B_DEFINE_HPKG_ATTRIBUTE(id, type, name, constant)       \
                B_HPKG_ATTRIBUTE_TYPE_##type,
diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp
index 2951a4d1d6..1a316e054d 100644
--- a/src/kits/tracker/FindPanel.cpp
+++ b/src/kits/tracker/FindPanel.cpp
@@ -92,12 +92,6 @@ All rights reserved.
 
 const char* kAllMimeTypes = "mime/ALLTYPES";
 
-const BRect kInitialRect(0, 0, 0, 0);
-const int32 kInitialAttrModeWindowHeight = 140;
-const int32 kIncrementPerAttribute = 30;
-const float kMoreOptionsDelta = 20;
-
-const uint32 kMoreOptionsMessage = 'mrop';
 const uint32 kNameModifiedMessage = 'nmmd';
 const uint32 kSwitchToQueryTemplate = 'swqt';
 const uint32 kRunSaveAsTemplatePanel = 'svtm';
@@ -217,7 +211,7 @@ MoreOptionsStruct::QueryTemporary(const BNode* node)
 
 FindWindow::FindWindow(const entry_ref* newRef, bool editIfTemplateOnly)
        :
-       BWindow(kInitialRect, B_TRANSLATE("Find"), B_TITLED_WINDOW,
+       BWindow(BRect(), B_TRANSLATE("Find"), B_TITLED_WINDOW,
                B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_CLOSE_ON_ESCAPE
                        | B_AUTO_UPDATE_SIZE_LIMITS),
        fFile(TryOpening(newRef)),
diff --git a/src/kits/tracker/TaskLoop.cpp b/src/kits/tracker/TaskLoop.cpp
index 482b09e03c..fb89ea801c 100644
--- a/src/kits/tracker/TaskLoop.cpp
+++ b/src/kits/tracker/TaskLoop.cpp
@@ -39,8 +39,6 @@ All rights reserved.
 #include "TaskLoop.h"
 
 
-const float kTaskOverhead = 0.01f;
-       // this should really be specified by the task itself
 const float kIdleTreshold = 0.15f;
 
 const bigtime_t kInfinity = B_INFINITE_TIMEOUT;
diff --git a/src/kits/tracker/TrackerInitialState.cpp 
b/src/kits/tracker/TrackerInitialState.cpp
index 0a84c32ee4..8aacd748b0 100644
--- a/src/kits/tracker/TrackerInitialState.cpp
+++ b/src/kits/tracker/TrackerInitialState.cpp
@@ -93,7 +93,6 @@ static const char* kNetPositiveSignature = 
"application/x-vnd.Be-NPOS";
 static const char* kPeopleSignature = "application/x-vnd.Be-PEPL";
 
 static const BRect kDefaultFrame(40, 40, 695, 350);
-static const int32 sDefaultQueryTemplateCount = 3;
 
 
 struct ColumnData
diff --git a/src/servers/app/decorator/DefaultDecorator.cpp 
b/src/servers/app/decorator/DefaultDecorator.cpp
index 51ad0c063b..efd3a0594f 100644
--- a/src/servers/app/decorator/DefaultDecorator.cpp
+++ b/src/servers/app/decorator/DefaultDecorator.cpp
@@ -51,7 +51,6 @@
 
 
 static const float kBorderResizeLength = 22.0;
-static const float kResizeKnobSize = 18.0;
 
 
 static inline uint8
diff --git a/src/servers/app/stackandtile/SATDecorator.cpp 
b/src/servers/app/stackandtile/SATDecorator.cpp
index 62796aa2fa..91a753ee98 100644
--- a/src/servers/app/stackandtile/SATDecorator.cpp
+++ b/src/servers/app/stackandtile/SATDecorator.cpp
@@ -27,9 +27,6 @@
 #endif
 
 
-static const float kResizeKnobSize = 18.0;
-
-
 static const rgb_color kFrameColors[4] = {
        { 152, 152, 152, 255 },
        { 240, 240, 240, 255 },
diff --git a/src/servers/app/stackandtile/Stacking.cpp 
b/src/servers/app/stackandtile/Stacking.cpp
index f7192d8726..94bcba8fb2 100644
--- a/src/servers/app/stackandtile/Stacking.cpp
+++ b/src/servers/app/stackandtile/Stacking.cpp
@@ -29,9 +29,6 @@
 using namespace BPrivate;
 
 
-const float kMaxTabWidth = 165.;
-
-
 bool
 StackingEventHandler::HandleMessage(SATWindow* sender,
        BPrivate::LinkReceiver& link, BPrivate::LinkSender& reply)
@@ -206,13 +203,13 @@ SATStacking::SATStacking(SATWindow* window)
        fSATWindow(window),
        fStackingParent(NULL)
 {
-       
+
 }
 
 
 SATStacking::~SATStacking()
 {
-       
+
 }
 
 
diff --git a/src/servers/keystore/StripeView.cpp 
b/src/servers/keystore/StripeView.cpp
index 6256e669d5..41f571496a 100644
--- a/src/servers/keystore/StripeView.cpp
+++ b/src/servers/keystore/StripeView.cpp
@@ -15,7 +15,6 @@
 #include <LayoutUtils.h>
 
 
-static const float kTopOffset = 10.0f;
 static const int kIconStripeWidth = 30;
 
 

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

Commit:      aa0836519a280613cd97df958e3aca797fe5ddf2
URL:         https://git.haiku-os.org/haiku/commit/?id=aa0836519a28
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sun Nov 25 02:07:18 2018 UTC

kernel: thread->name is never NULL as it is an array.

Spotted by Clang (-Wtautological-pointer-compare.)

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

diff --git a/src/system/kernel/thread.cpp b/src/system/kernel/thread.cpp
index b10f32a4e5..7ee66364f7 100644
--- a/src/system/kernel/thread.cpp
+++ b/src/system/kernel/thread.cpp
@@ -1708,8 +1708,7 @@ _dump_thread_info(Thread *thread, bool shortInfo)
                        kprintf(" -");
 
                kprintf("%4" B_PRId32 "  %p%5" B_PRId32 "  %s\n", 
thread->priority,
-                       (void *)thread->kernel_stack_base, thread->team->id,
-                       thread->name != NULL ? thread->name : "<NULL>");
+                       (void *)thread->kernel_stack_base, thread->team->id, 
thread->name);
 
                return;
        }

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

Revision:    hrev52591
Commit:      ef593f61a261ce8f9f43c0fd6f7ee7de3dcdbe48
URL:         https://git.haiku-os.org/haiku/commit/?id=ef593f61a261
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sun Nov 25 02:08:31 2018 UTC

ELF: Ignore PT_EH_FRAME and PT_STACK.

This allows Clang builds (linked with our cross binutils) to
at least start runtime_loader and then try to load launch_daemon.
That fails with an infinite loop somewhere...

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

diff --git a/headers/os/kernel/elf.h b/headers/os/kernel/elf.h
index 45a8212a74..d4deca9c2e 100644
--- a/headers/os/kernel/elf.h
+++ b/headers/os/kernel/elf.h
@@ -322,6 +322,7 @@ typedef struct {
 #define PT_SHLIB               5
 #define PT_PHDR                        6
 #define PT_TLS                 7
+#define PT_EH_FRAME            0x6474e550
 #define PT_STACK               0x6474e551
 #define PT_RELRO               0x6474e552
 
diff --git a/src/system/kernel/elf.cpp b/src/system/kernel/elf.cpp
index 6aa29c8fda..ea76f0327e 100644
--- a/src/system/kernel/elf.cpp
+++ b/src/system/kernel/elf.cpp
@@ -2283,6 +2283,7 @@ load_kernel_add_on(const char *path)
                                // should check here for appropriate interpreter
                                continue;
                        case PT_PHDR:
+                       case PT_STACK:
                                // we don't use it
                                continue;
                        default:
diff --git a/src/system/runtime_loader/elf_load_image.cpp 
b/src/system/runtime_loader/elf_load_image.cpp
index b4cf78a786..fc0267ed26 100644
--- a/src/system/runtime_loader/elf_load_image.cpp
+++ b/src/system/runtime_loader/elf_load_image.cpp
@@ -75,6 +75,7 @@ count_regions(const char* imagePath, char const* buff, int 
phnum, int phentsize)
                        case PT_PHDR:
                                // we don't use it
                                break;
+                       case PT_EH_FRAME:
                        case PT_RELRO:
                                // not implemented yet, but can be ignored
                                break;
@@ -199,6 +200,7 @@ parse_program_headers(image_t* image, char* buff, int 
phnum, int phentsize)
                        case PT_PHDR:
                                // we don't use it
                                break;
+                       case PT_EH_FRAME:
                        case PT_RELRO:
                                // not implemented yet, but can be ignored
                                break;


Other related posts:

  • » [haiku-commits] haiku: hrev52591 - in src: apps/deskbar kits/tracker system/kernel kits/interface servers/app/stackandtile - waddlesplash