hrev52584 adds 4 changesets to branch 'master'
old head: e0a6d5ceebc989a9b3ee1a111007adf0739aadcb
new head: d4c38925ba390070cbb3554b3b0d223f2903ae36
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=d4c38925ba39+%5Ee0a6d5ceebc9
----------------------------------------------------------------------------
430f303fdaa7: file_systems/cdda: Set CDDB lookups based on the actual parameter.
Found by -Werror=set-but-unused.
8732e626e23f: pkgman: Handle -y argument to "drop-repo" command.
Found by -Werror=set-but-unused.
62c7ec5c06eb: Fix various instances of -Wset-but-unused.
Largely no functional change; most of these are just
removing the unused variables.
d4c38925ba39: configure: Restore execute bit.
It seems "git stash" on Windows loses filemodes... sorry about that.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
13 files changed, 112 insertions(+), 133 deletions(-)
configure | 0
.../file_systems/cdda/kernel_interface.cpp | 2 +-
.../file_systems/userlandfs/shared/String.cpp | 2 -
.../cortex/MediaRoutingView/MediaRoutingView.cpp | 126 +++++++++----------
.../cortex/ValControl/ValControlDigitSegment.cpp | 84 ++++++-------
.../gui/inspector_window/MemoryView.cpp | 2 -
src/bin/pkgman/command_drop_repo.cpp | 7 +-
src/kits/codec/FormatManager.cpp | 4 +-
src/kits/interface/ColumnListView.cpp | 3 -
src/kits/tracker/CountView.cpp | 1 -
src/kits/translation/TranslatorRoster.cpp | 2 -
src/servers/bluetooth/LocalDeviceImpl.cpp | 8 +-
src/servers/notification/AppGroupView.cpp | 4 +-
############################################################################
Commit: 430f303fdaa74ffd9034b7856a51d1940df818f1
URL: https://git.haiku-os.org/haiku/commit/?id=430f303fdaa7
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Fri Nov 23 22:59:35 2018 UTC
file_systems/cdda: Set CDDB lookups based on the actual parameter.
Found by -Werror=set-but-unused.
----------------------------------------------------------------------------
diff --git a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp
b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp
index e43c8035a9..8e0f239aba 100644
--- a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp
+++ b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp
@@ -733,7 +733,7 @@ Volume::Mount(const char* device)
fRootNode->AddAttribute(kCddbIdAttribute, B_UINT32_TYPE, fDiscID);
// Add CD:do_lookup attribute.
- SetCDDBLookupsEnabled(true);
+ SetCDDBLookupsEnabled(doLookup);
// Add CD:toc attribute.
fRootNode->AddAttribute(kTocAttribute, B_RAW_TYPE, true,
############################################################################
Commit: 8732e626e23f4af08bdcc3fd5a6e11609053da92
URL: https://git.haiku-os.org/haiku/commit/?id=8732e626e23f
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Fri Nov 23 23:00:08 2018 UTC
pkgman: Handle -y argument to "drop-repo" command.
Found by -Werror=set-but-unused.
----------------------------------------------------------------------------
diff --git a/src/bin/pkgman/command_drop_repo.cpp
b/src/bin/pkgman/command_drop_repo.cpp
index 9c4988a8bf..358322545a 100644
--- a/src/bin/pkgman/command_drop_repo.cpp
+++ b/src/bin/pkgman/command_drop_repo.cpp
@@ -43,7 +43,7 @@ DEFINE_COMMAND(DropRepoCommand, "drop-repo", kShortUsage,
kLongUsage,
int
DropRepoCommand::Execute(int argc, const char* const* argv)
{
- bool yesMode = false;
+ bool interactive = true;
while (true) {
static struct option sLongOptions[] = {
@@ -63,7 +63,7 @@ DropRepoCommand::Execute(int argc, const char* const* argv)
break;
case 'y':
- yesMode = true;
+ interactive = false;
break;
default:
@@ -79,8 +79,7 @@ DropRepoCommand::Execute(int argc, const char* const* argv)
const char* repoName = argv[optind];
DecisionProvider decisionProvider;
-// if (yesMode)
-// decisionProvider.SetAcceptEverything(true);
+ decisionProvider.SetInteractive(interactive);
JobStateListener listener;
BContext context(decisionProvider, listener);
############################################################################
Commit: 62c7ec5c06eb3be95b2774315f6d04b69ad9fae5
URL: https://git.haiku-os.org/haiku/commit/?id=62c7ec5c06eb
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Fri Nov 23 23:04:38 2018 UTC
Fix various instances of -Wset-but-unused.
Largely no functional change; most of these are just
removing the unused variables.
----------------------------------------------------------------------------
diff --git a/src/add-ons/kernel/file_systems/userlandfs/shared/String.cpp
b/src/add-ons/kernel/file_systems/userlandfs/shared/String.cpp
index 966b7cdd22..414d58591d 100644
--- a/src/add-ons/kernel/file_systems/userlandfs/shared/String.cpp
+++ b/src/add-ons/kernel/file_systems/userlandfs/shared/String.cpp
@@ -87,9 +87,7 @@ String::Truncate(int32 newLength)
newLength = 0;
if (newLength < fLength) {
char *string = fString;
- int32 len = fLength;
fString = NULL;
- len = 0;
if (!_SetTo(string, newLength)) {
fString = string;
fLength = newLength;
diff --git a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
index d9d060a3e9..376502494c 100644
--- a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
+++ b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
@@ -131,7 +131,7 @@ MediaRoutingView::~MediaRoutingView() {
D_METHOD(("MediaRoutingView::~MediaRoutingView()\n"));
_emptyInactiveNodeState();
-
+
// quit ParameterWindowManager if necessary
ParameterWindowManager::shutDown();
@@ -200,11 +200,11 @@ DiagramWire *MediaRoutingView::createWire(
status_t error;
Connection connection;
error = manager->connect(output, input, &connection);
-/* if (error)
+ if (error)
{
showErrorMessage("Could not connect", error);
}
-*/ }
+ }
}
return 0;
}
@@ -275,7 +275,7 @@ MediaRoutingView::MessageDropped(BPoint point, BMessage
*message)
s << "Could not
instantiate '" << info.name << "'";
showErrorMessage(s,
error);
}
- }
+ }
}
}
break;
@@ -322,7 +322,7 @@ void MediaRoutingView::AttachedToWindow()
{
D_METHOD(("MediaRoutingView::AttachedToWindow()\n"));
_inherited::AttachedToWindow();
-
+
// attach to manager
ASSERT(manager);
add_observer(this, manager);
@@ -341,20 +341,18 @@ void MediaRoutingView::AllAttached()
{
D_METHOD(("MediaRoutingView::AllAttached()\n"));
_inherited::AllAttached();
-
+
_adjustScrollBars();
// grab keyboard events
MakeFocus();
-}
+}
void MediaRoutingView::DetachedFromWindow()
{
D_METHOD(("MediaRoutingView::DetachedFromWindow()\n"));
_inherited::DetachedFromWindow();
- status_t error;
-
// detach from manager
if (manager)
{
@@ -365,7 +363,7 @@ void MediaRoutingView::DetachedFromWindow()
{
remove_observer(this, ref);
}
- error = remove_observer(this, manager);
+ remove_observer(this, manager);
const_cast<RouteAppNodeManager *&>(manager) = 0;
}
}
@@ -429,7 +427,7 @@ void MediaRoutingView::MessageReceived(
int32 count;
if (message->GetInfo("media_node_id", &type, &count) ==
B_OK)
{
- for(int32 n = 0; n < count; n++)
+ for(int32 n = 0; n < count; n++)
{
int32 id;
if (message->FindInt32("media_node_id",
n, &id) == B_OK)
@@ -450,7 +448,7 @@ void MediaRoutingView::MessageReceived(
int32 count;
if (message->GetInfo("media_node_id", &type, &count) ==
B_OK)
{
- for (int32 n = 0; n < count; n++)
+ for (int32 n = 0; n < count; n++)
{
int32 id;
if (message->FindInt32("media_node_id",
n, &id) == B_OK)
@@ -458,7 +456,7 @@ void MediaRoutingView::MessageReceived(
_removePanelFor(id);
}
}
- }
+ }
break;
}
case B_MEDIA_CONNECTION_MADE:
@@ -499,7 +497,7 @@ void MediaRoutingView::MessageReceived(
if
(message->FindInt32("__connection_id", n, &id) == B_OK)
{
_removeWireFor(id);
- }
+ }
}
}
break;
@@ -507,7 +505,7 @@ void MediaRoutingView::MessageReceived(
case B_MEDIA_FORMAT_CHANGED:
{
D_MESSAGE(("MediaRoutingView::MessageReceived(B_MEDIA_FORMAT_CHANGED)\n"));
-
+
media_node_id nodeID;
if(message->FindInt32("__source_node_id", &nodeID) <
B_OK)
break;
@@ -520,7 +518,7 @@ void MediaRoutingView::MessageReceived(
ssize_t dataSize;
if(message->FindData("be:source", B_RAW_TYPE, (const
void**)&source, &dataSize) < B_OK)
break;
-
+
MediaWire* wire;
if(_findWireFor(connectionID, &wire) == B_OK) {
// copy new connection data
@@ -590,7 +588,7 @@ void MediaRoutingView::MessageReceived(
NodeRef* ref;
if(manager->getNodeRef(id, &ref) < B_OK)
break;
-
+
bigtime_t when = system_time();
status_t err =
manager->roster->StartTimeSource(ref->node(), when);
if(err < B_OK) {
@@ -609,7 +607,7 @@ void MediaRoutingView::MessageReceived(
NodeRef* ref;
if(manager->getNodeRef(id, &ref) < B_OK)
break;
-
+
bigtime_t when = system_time();
status_t err =
manager->roster->StopTimeSource(ref->node(), when);
if(err < B_OK) {
@@ -703,10 +701,10 @@ void MediaRoutingView::MessageReceived(
{
D_MESSAGE(("MediaRoutingView::MessageReceived(NodeManager::M_RELEASED)\n"));
remove_observer(this, manager);
- const_cast<RouteAppNodeManager*&>(manager) = 0;
+ const_cast<RouteAppNodeManager*&>(manager) = 0;
// +++++ disable view!
break;
- }
+ }
case NodeRef::M_RELEASED:
{
D_MESSAGE(("MediaRoutingView::MessageReceived(NodeRef::M_RELEASED)\n"));
@@ -728,7 +726,7 @@ BPoint MediaRoutingView::findFreePositionFor(
const MediaNodePanel* panel) const
{
D_METHOD(("MediaRoutingView::_findFreeSpotFor()\n"));
-
+
BPoint p(M_CLEANUP_H_MARGIN, M_CLEANUP_V_MARGIN);
if (panel)
{
@@ -790,7 +788,7 @@ BPoint MediaRoutingView::findFreePositionFor(
{
p.x = right + M_CLEANUP_H_GAP;
}
- break;
+ break;
}
}
}
@@ -805,7 +803,7 @@ void MediaRoutingView::layoutChanged(
layout_t layout)
{
D_METHOD(("MediaRoutingView::layoutChanged()\n"));
-
+
switch (layout)
{
case M_ICON_VIEW:
@@ -1013,7 +1011,7 @@ status_t MediaRoutingView::importState(
if(err == B_OK && layout != m_layout) {
layoutChanged(layout);
}
-
+
const char* path;
err = archive->FindString("bgBitmap", &path);
if(err == B_OK) {
@@ -1031,8 +1029,8 @@ status_t MediaRoutingView::importState(
archive->FindInt8("bgGreen", (int8*)&color.green) ==
B_OK &&
archive->FindInt8("bgBlue", (int8*)&color.blue) == B_OK)
_changeBackground(color);
- }
-
+ }
+
for(int32 n = 0; ; ++n) {
// find panel state info; stop when exhausted
@@ -1040,12 +1038,12 @@ status_t MediaRoutingView::importState(
err = archive->FindMessage("panel", n, &m);
if(err < B_OK)
break;
-
+
const char* nodeName;
err = archive->FindString("nodeName", n, &nodeName);
if(err < B_OK)
break;
-
+
uint32 nodeKind;
err = archive->FindInt32("nodeKind", n, (int32*)&nodeKind);
if(err < B_OK)
@@ -1058,14 +1056,14 @@ status_t MediaRoutingView::importState(
panelIndex = 0;
panelIndex < items;
++panelIndex) {
-
+
MediaNodePanel* panel = dynamic_cast<MediaNodePanel*>(
ItemAt(panelIndex, DiagramItem::M_BOX));
-
+
if(panel &&
!strcmp(panel->ref->name(), nodeName) &&
panel->ref->kind() == nodeKind) {
-
+
// found match; hand message to panel
panel->importState(&m);
break;
@@ -1084,7 +1082,7 @@ status_t MediaRoutingView::importState(
}
updateDataRect();
-
+
return B_OK;
}
@@ -1113,7 +1111,7 @@ status_t MediaRoutingView::exportState(
ItemAt(n, DiagramItem::M_BOX));
if(!panel)
continue;
-
+
if(panel->ref->isInternal())
// skip internal nodes
continue;
@@ -1122,9 +1120,9 @@ status_t MediaRoutingView::exportState(
panel->exportState(&m);
archive->AddString("nodeName", panel->ref->name());
archive->AddInt32("nodeKind", panel->ref->kind());
- archive->AddMessage("panel", &m);
+ archive->AddMessage("panel", &m);
}
-
+
// copy inactive node state info
for(int32 n = 0; n < m_inactiveNodeState.CountItems(); ++n) {
_inactive_node_state_entry* e =
reinterpret_cast<_inactive_node_state_entry*>(
@@ -1135,7 +1133,7 @@ status_t MediaRoutingView::exportState(
archive->AddMessage("panel", &e->state);
}
- return B_OK;
+ return B_OK;
}
// [e.moon 8dec99] subset support
@@ -1153,7 +1151,7 @@ status_t MediaRoutingView::importStateFor(
err = archive->FindString("nodeKey", archiveIndex, &key);
if(err < B_OK)
break;
-
+
BMessage m;
err = archive->FindMessage("panel", archiveIndex, &m);
if(err < B_OK) {
@@ -1162,7 +1160,7 @@ status_t MediaRoutingView::importStateFor(
B_PRId32 "\n", archiveIndex));
continue;
}
-
+
// find corresponding node
media_node_id id;
err = context->getNodeFor(key, &id);
@@ -1172,7 +1170,7 @@ status_t MediaRoutingView::importStateFor(
key));
continue;
}
-
+
// look for panel, create it if necessary
MediaNodePanel* panel;
err = _findPanelFor(id, &panel);
@@ -1199,11 +1197,11 @@ status_t MediaRoutingView::importStateFor(
// pass state data along
panel->importState(&m);
-
+
// select the panel
SelectItem(panel, false);
}
-
+
return B_OK;
}
@@ -1212,7 +1210,7 @@ status_t MediaRoutingView::exportStateFor(
BMessage*
archive) const {
status_t err;
-
+
for(uint32 n = 0; n < context->countNodes(); ++n) {
MediaNodePanel* panel;
err = _findPanelFor(
@@ -1225,15 +1223,15 @@ status_t MediaRoutingView::exportStateFor(
context->nodeAt(n)));
return B_BAD_VALUE;
}
-
+
const char* key = context->keyAt(n);
-
+
archive->AddString("nodeKey", key);
BMessage m;
panel->exportState(&m);
archive->AddMessage("panel", &m);
}
-
+
return B_OK;
}
@@ -1329,7 +1327,7 @@ status_t MediaRoutingView::_addWireFor(
&& (_findPanelFor(connection.destinationNode(), &destination) == B_OK))
{
status_t error;
-
+
media_output output;
error = connection.getOutput(&output);
if (error)
@@ -1392,7 +1390,7 @@ status_t MediaRoutingView::_removeWireFor(
uint32 connectionID)
{
D_METHOD(("MediaRoutingView::_removeWireFor()\n"));
-
+
MediaWire *wire;
if (_findWireFor(connectionID, &wire) == B_OK)
{
@@ -1413,8 +1411,8 @@ status_t MediaRoutingView::_removeWireFor(
destination->updateIOJacks();
destination->arrangeIOJacks();
Invalidate(destination->Frame());
- }
-
+ }
+
// [e.moon 21nov99] group split/remove now performed by
// RouteAppNodeManager
@@ -1569,7 +1567,7 @@ void MediaRoutingView::_changeCyclingForSelection(
if (panel && (panel->ref->isCycling() != cycle))
{
panel->ref->setCycling(cycle);
- }
+ }
}
manager->unlock();
}
@@ -1680,7 +1678,7 @@ void MediaRoutingView::_deleteSelection()
s << "Could not release '" <<
panel->ref->name() << "'";
showErrorMessage(s, error);
}
- }
+ }
}
}
else if (SelectedType() == DiagramItem::M_WIRE)
@@ -1723,7 +1721,7 @@ void MediaRoutingView::_checkDroppedFile(
{
BMimeType mimeType(mimeString);
BMimeType superType;
-
+
// [e.moon 22dec99] handle dropped node-set
files
if(mimeType == RouteApp::s_nodeSetType) {
BMessage m(B_REFS_RECEIVED);
@@ -1753,7 +1751,7 @@ void MediaRoutingView::_checkDroppedFile(
}
else
{
- char
fileName[B_FILE_NAME_LENGTH];
+ char
fileName[B_FILE_NAME_LENGTH];
BEntry entry(ref);
entry.GetName(fileName);
BString s;
@@ -1773,17 +1771,17 @@ void MediaRoutingView::_changeBackground(
D_METHOD(("MediaRoutingView::_changeBackground()\n"));
status_t error;
- BBitmap *background = 0;
- BFile file(ref, B_READ_ONLY);
+ BBitmap *background = 0;
+ BFile file(ref, B_READ_ONLY);
error = file.InitCheck();
if (!error)
{
- BTranslatorRoster *roster = BTranslatorRoster::Default();
- BBitmapStream stream;
+ BTranslatorRoster *roster = BTranslatorRoster::Default();
+ BBitmapStream stream;
error = roster->Translate(&file, NULL, NULL, &stream,
B_TRANSLATOR_BITMAP);
if (!error)
{
- stream.DetachBitmap(&background);
+ stream.DetachBitmap(&background);
setBackgroundBitmap(background);
Invalidate();
@@ -1800,7 +1798,7 @@ void MediaRoutingView::_changeBackground(
D_METHOD(("MediaRoutingView::_changeBackground()\n"));
setBackgroundColor(color);
Invalidate();
-
+
// [e.moon 1dec99] persistence, yay
m_backgroundBitmapEntry.Unset();
}
@@ -1827,7 +1825,7 @@ MediaRoutingView::_adjustScrollBars()
}
}
-void
+void
MediaRoutingView::_broadcastSelection() const
{
int32 selectedGroup = 0;
@@ -1855,7 +1853,7 @@ MediaRoutingView::_broadcastSelection() const
messenger.SendMessage(&groupMsg);
}
-status_t
+status_t
MediaRoutingView::_fetchInactiveNodeState(MediaNodePanel *forPanel, BMessage
*outMessage)
{
// copy inactive node state info
@@ -1866,7 +1864,7 @@ MediaRoutingView::_fetchInactiveNodeState(MediaNodePanel
*forPanel, BMessage *ou
ASSERT(e);
if(e->name != forPanel->ref->name())
continue;
-
+
if(e->kind != forPanel->ref->kind())
continue;
@@ -1876,10 +1874,10 @@
MediaRoutingView::_fetchInactiveNodeState(MediaNodePanel *forPanel, BMessage *ou
return B_OK;
}
- return B_BAD_VALUE;
+ return B_BAD_VALUE;
}
-void
+void
MediaRoutingView::_emptyInactiveNodeState()
{
int32 c = m_inactiveNodeState.CountItems();
diff --git a/src/apps/cortex/ValControl/ValControlDigitSegment.cpp
b/src/apps/cortex/ValControl/ValControlDigitSegment.cpp
index 905d1a005b..4874fe5d0c 100644
--- a/src/apps/cortex/ValControl/ValControlDigitSegment.cpp
+++ b/src/apps/cortex/ValControl/ValControlDigitSegment.cpp
@@ -62,7 +62,7 @@ ValControlDigitSegment::ValControlDigitSegment(
int16
scaleFactor,
bool
negativeVisible,
display_flags
flags) :
-
+
ValControlSegment(SOLID_UNDERLINE),
m_digitCount(digitCount),
@@ -75,7 +75,7 @@ ValControlDigitSegment::ValControlDigitSegment(
m_digitPadding(0.0),
m_flags(flags),
m_negativeVisible(negativeVisible) {}
-
+
ValControlDigitSegment::~ValControlDigitSegment() {}
uint16 ValControlDigitSegment::digitCount() const {
@@ -102,12 +102,12 @@ int64 ValControlDigitSegment::value() const {
void ValControlDigitSegment::setValue(
int64
value,
bool
negative) {
-
+
if(
value == m_value &&
m_negative == negative)
return;
-
+
m_value = value;
m_negative = negative;
Invalidate();
@@ -117,24 +117,24 @@ void ValControlDigitSegment::setValue(
//void ValControlDigitSegment::setValue(double dfValue) {
//
// printf("seg[%d]::setValue(%.12f)\n", m_digitCount, dfValue);
-//
-// // convert possibly-negative value into absolute value and
+//
+// // convert possibly-negative value into absolute value and
// // negative flag
// bool m_bWasNegative = m_negative;
// m_negative = (m_negativeVisible && dfValue < 0.0);
// dfValue = fabs(dfValue);
//
// // prepare to scale the value to fit the digits this segment
-// // represents
-// bool bMult = m_scaleFactor < 0;
+// // represents
+// bool bMult = m_scaleFactor < 0;
// int64 nLowPow = m_scaleFactor ? (int64)pow(10.0, abs(m_scaleFactor)) :
1;
// int64 nHighPow = (int64)pow(10.0, m_digitCount);
-//
+//
//// printf(" lowPow %Ld, highPow %Ld\n", nLowPow, nHighPow);
-//
+//
// double dfTemp = bMult ? dfValue * nLowPow : dfValue / nLowPow;
//// printf(" -> %.8lf\n", dfTemp);
-//
+//
// int64 nLocal;
// if(m_scaleFactor < 0) {
// // really ugly rounding business: there must be a cleaner
@@ -152,7 +152,7 @@ void ValControlDigitSegment::setValue(
//// printf(" -> %Ld\n", nLocal);
// nLocal %= nHighPow;
//// printf(" -> %Ld\n", nLocal);
-//
+//
// if(nLocal != m_value || m_negative != m_bWasNegative) {
// m_value = nLocal;
// Invalidate();
@@ -172,10 +172,10 @@ float ValControlDigitSegment::handleDragUpdate(
int64 units = (int64)(distance / dragScaleFactor());
float remaining = distance;
-
+
if(units) {
remaining = fmod(distance, dragScaleFactor());
-
+
// +++++ echk [23aug99] -- is this the only way?
NumericValControl* numericParent =
dynamic_cast<NumericValControl*>(parent());
ASSERT(numericParent);
@@ -183,16 +183,16 @@ float ValControlDigitSegment::handleDragUpdate(
// adjust value for parent:
// dfUnits = floor(dfUnits);
// dfUnits *= pow(10.0, m_scaleFactor);
-//
+//
// // ++++++ 17sep99
// PRINT((
// "offset: %.8f\n", dfUnits));
-//
+//
// numericParent->offsetValue(dfUnits);
numericParent->offsetSegmentValue(this, units);
}
-
+
// return 'unused pixels'
return remaining;
}
@@ -222,9 +222,9 @@ void ValControlDigitSegment::Draw(BRect updateRect) {
rgb_color black = {0,0,0,255};
rgb_color disabled = tint_color(black, B_LIGHTEN_2_TINT);
rgb_color viewColor = ViewColor();
-
+
// +++++
-
+
BRect b = Bounds();
// PRINT((
// "# ValControlDigitSegment::Draw(%.1f,%.1f,%.1f,%.1f) %s\n"
@@ -232,12 +232,12 @@ void ValControlDigitSegment::Draw(BRect updateRect) {
// updateRect.left, updateRect.top, updateRect.right,
updateRect.bottom,
// pBufferBitmap ? "(BUFFERED)" : "(DIRECT)",
// Frame().left, Frame().top, Frame().right, Frame().bottom));
-
+
float digitWidth = MaxDigitWidth(m_font);
BPoint p;
p.x = b.right - digitWidth;
p.y = m_yOffset;
-
+
// // clear background
// pView->SetHighColor(white);
// pView->FillRect(b);
@@ -245,13 +245,13 @@ void ValControlDigitSegment::Draw(BRect updateRect) {
// draw a digit at a time, right to left (low->high)
pView->SetFont(m_font);
if(parent()->IsEnabled()) {
-
+
pView->SetHighColor(black);
} else {
-
+
pView->SetHighColor(disabled);
}
-
+
pView->SetLowColor(viewColor);
int16 digit;
int64 cur = abs(m_value);
@@ -280,7 +280,7 @@ void ValControlDigitSegment::Draw(BRect updateRect) {
pBufferBitmap->Unlock();
}
- _inherited::Draw(updateRect);
+ _inherited::Draw(updateRect);
}
// must have parent at this point +++++
@@ -318,42 +318,40 @@ void ValControlDigitSegment::fontChanged(
const BFont*
font) {
// PRINT((
// "* ValControlDigitSegment::fontChanged()\n"));
-
+
m_font = font;
m_font->GetHeight(&m_fontHeight);
-
+
ASSERT(parent());
m_yOffset = parent()->baselineOffset();
char c = '-';
m_minusSignWidth = m_font->StringWidth(&c, 1) + s_widthTrim;
// space between digits should be the same as space between
- // segments, for consistent look:
+ // segments, for consistent look:
m_digitPadding = parent()->segmentPadding();
}
-
+
// -------------------------------------------------------- //
// BHandler impl.
// -------------------------------------------------------- //
void ValControlDigitSegment::MessageReceived(BMessage* pMsg) {
-
+
double fVal;
- status_t err;
-
+
switch(pMsg->what) {
-
+
case ValControl::M_SET_VALUE:
- err = pMsg->FindDouble("value", &fVal);
- ASSERT(err == B_OK);
+ pMsg->FindDouble("value", &fVal);
setValue((int64)fVal, fVal < 0);
break;
-
+
case ValControl::M_GET_VALUE: {
BMessage reply(ValControl::M_VALUE);
reply.AddDouble("value", value());
- pMsg->SendReply(&reply);
+ pMsg->SendReply(&reply);
break;
}
}
@@ -371,11 +369,11 @@ ValControlDigitSegment::ValControlDigitSegment(BMessage*
pArchive) :
// #/digits
status_t err = pArchive->FindInt16("digits", (int16*)&m_digitCount);
ASSERT(err == B_OK);
-
- // current value
+
+ // current value
err = pArchive->FindInt64("value", &m_value);
ASSERT(err == B_OK);
-
+
// scaling
err = pArchive->FindInt16("scaleFactor", &m_scaleFactor);
ASSERT(err == B_OK);
@@ -387,7 +385,7 @@ status_t ValControlDigitSegment::Archive(BMessage*
pArchive, bool bDeep) const{
pArchive->AddInt16("digits", m_digitCount);
pArchive->AddInt64("value", m_value);
pArchive->AddInt16("scaleFactor", m_scaleFactor);
-
+
return B_OK;
}
@@ -408,7 +406,7 @@ float ValControlDigitSegment::MaxDigitWidth(const BFont*
pFont) {
ASSERT(pFont);
if(s_cachedFont == pFont)
return s_cachedDigitWidth;
-
+
s_cachedFont = pFont;
float fMax = 0.0;
for(char c = '0'; c <= '9'; c++) {
@@ -416,7 +414,7 @@ float ValControlDigitSegment::MaxDigitWidth(const BFont*
pFont) {
if(fWidth > fMax)
fMax = fWidth;
}
-
+
s_cachedDigitWidth = ceil(fMax + s_widthTrim);
return s_cachedDigitWidth;
}
diff --git
a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
index 18bb9f5709..801ae4f92a 100644
--- a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
+++ b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
@@ -194,8 +194,6 @@ MemoryView::Draw(BRect rect)
BPoint drawPoint(1.0, (startLine + 1) * fLineHeight);
int32 currentBlocksPerLine = fHexBlocksPerLine;
int32 currentCharsPerLine = fTextCharsPerLine;
- rgb_color addressColor = tint_color(HighColor(), B_LIGHTEN_1_TINT);
- rgb_color dataColor = HighColor();
font_height fh;
GetFontHeight(&fh);
target_addr_t lineAddress = fTargetBlock->BaseAddress() + startLine
diff --git a/src/kits/codec/FormatManager.cpp b/src/kits/codec/FormatManager.cpp
index dce7021a39..12a72c21bd 100644
--- a/src/kits/codec/FormatManager.cpp
+++ b/src/kits/codec/FormatManager.cpp
@@ -161,7 +161,7 @@ FormatManager::~FormatManager()
If there were any changes since the last time, the whole
list will be sent back.
*/
-void
+void
FormatManager::GetFormats(bigtime_t lastUpdate, BMessage& reply)
{
BAutolock locker(fLock);
@@ -251,7 +251,7 @@ FormatManager::MakeFormatFor(const
media_format_description* descriptions,
}
}
- return B_OK;
+ return result;
}
diff --git a/src/kits/interface/ColumnListView.cpp
b/src/kits/interface/ColumnListView.cpp
index c75dcd8694..19ae6f8deb 100644
--- a/src/kits/interface/ColumnListView.cpp
+++ b/src/kits/interface/ColumnListView.cpp
@@ -2539,9 +2539,6 @@ void
TitleView::DrawTitle(BView* view, BRect rect, BColumn* column, bool depressed)
{
BRect drawRect;
- rgb_color borderColor = mix_color(
- fMasterView->Color(B_COLOR_HEADER_BACKGROUND),
- make_color(0, 0, 0), 128);
drawRect = rect;
font_height fh;
diff --git a/src/kits/tracker/CountView.cpp b/src/kits/tracker/CountView.cpp
index 27620e4a3e..6a119f51fb 100644
--- a/src/kits/tracker/CountView.cpp
+++ b/src/kits/tracker/CountView.cpp
@@ -243,7 +243,6 @@ BCountView::Draw(BRect updateRect)
rgb_color light = tint_color(ViewColor(), B_LIGHTEN_MAX_TINT);
rgb_color shadow = tint_color(ViewColor(), B_DARKEN_2_TINT);
- rgb_color lightShadow = tint_color(ViewColor(), B_DARKEN_1_TINT);
BeginLineArray(fShowingBarberPole && !fStartSpinningAfter ? 9 : 5);
diff --git a/src/kits/translation/TranslatorRoster.cpp
b/src/kits/translation/TranslatorRoster.cpp
index 208ec850e4..8ac563caa0 100644
--- a/src/kits/translation/TranslatorRoster.cpp
+++ b/src/kits/translation/TranslatorRoster.cpp
@@ -1088,7 +1088,6 @@ BTranslatorRoster::Private::_RemoveTranslators(const
node_ref* nodeRef,
TranslatorMap::iterator iterator = fTranslators.begin();
BMessage update(B_TRANSLATOR_REMOVED);
- image_id image = -1;
while (iterator != fTranslators.end()) {
TranslatorMap::iterator next = iterator;
@@ -1099,7 +1098,6 @@ BTranslatorRoster::Private::_RemoveTranslators(const
node_ref* nodeRef,
|| (nodeRef != NULL && item.ref.device ==
nodeRef->device
&& item.node == nodeRef->node)) {
item.translator->Release();
- image = item.image;
update.AddInt32("translator_id", iterator->first);
fTranslators.erase(iterator);
diff --git a/src/servers/bluetooth/LocalDeviceImpl.cpp
b/src/servers/bluetooth/LocalDeviceImpl.cpp
index a077def37e..650d413abc 100644
--- a/src/servers/bluetooth/LocalDeviceImpl.cpp
+++ b/src/servers/bluetooth/LocalDeviceImpl.cpp
@@ -703,7 +703,6 @@ LocalDeviceImpl::CommandComplete(struct
hci_ev_cmd_complete* event,
default:
TRACE_BT("LocalDeviceImpl: Command Complete not
handled\n");
break;
-
}
}
@@ -712,10 +711,8 @@ void
LocalDeviceImpl::CommandStatus(struct hci_ev_cmd_status* event,
BMessage* request, int32 index)
{
-
int16 opcodeExpected;
BMessage reply;
- status_t status;
// Handle command complete information
request->FindInt16("opcodeExpected", index, &opcodeExpected);
@@ -733,7 +730,7 @@ LocalDeviceImpl::CommandStatus(struct hci_ev_cmd_status*
event,
TRACE_BT("LocalDeviceImpl: Inquiry status %x\n",
event->status);
reply.AddInt8("status", event->status);
- status = request->SendReply(&reply);
+ request->SendReply(&reply);
//printf("Sending reply... %ld\n", status);
// debug reply.PrintToStream();
@@ -752,7 +749,7 @@ LocalDeviceImpl::CommandStatus(struct hci_ev_cmd_status*
event,
event->status);
reply.AddInt8("status", event->status);
- status = request->SendReply(&reply);
+ request->SendReply(&reply);
//printf("Sending reply... %ld\n", status);
// debug reply.PrintToStream();
@@ -779,7 +776,6 @@ LocalDeviceImpl::CommandStatus(struct hci_ev_cmd_status*
event,
TRACE_BT("LocalDeviceImpl: Command Status not
handled\n");
break;
}
-
}
diff --git a/src/servers/notification/AppGroupView.cpp
b/src/servers/notification/AppGroupView.cpp
index b7d286568b..24fd21a2f7 100644
--- a/src/servers/notification/AppGroupView.cpp
+++ b/src/servers/notification/AppGroupView.cpp
@@ -49,8 +49,6 @@ AppGroupView::Draw(BRect updateRect)
{
rgb_color menuColor = ViewColor();
BRect bounds = Bounds();
- rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
- rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT);
bounds.bottom = bounds.top + fHeaderSize;
// Draw the header background
@@ -201,7 +199,7 @@ AppGroupView::MessageReceived(BMessage* msg)
removeSelfMessage.AddPointer("view", this);
fMessenger.SendMessage(&removeSelfMessage);
}
-
+
break;
}
default:
############################################################################
Revision: hrev52584
Commit: d4c38925ba390070cbb3554b3b0d223f2903ae36
URL: https://git.haiku-os.org/haiku/commit/?id=d4c38925ba39
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Fri Nov 23 23:40:47 2018 UTC
configure: Restore execute bit.
It seems "git stash" on Windows loses filemodes... sorry about that.
----------------------------------------------------------------------------
diff --git a/configure b/configure
old mode 100644
new mode 100755