Applied patch by kaliber from ticket #6349. which fixes quite a
few warnings. Thanks! I did not apply the hunks about moving a logging function in the common accelerant code to be static. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39320 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -145,7 +145,7 @@ struct R128_RAMSpec { // All values in XCLKS
|
|||||||
int readToWriteDelay; // Read to Write Delay
|
int readToWriteDelay; // Read to Write Delay
|
||||||
int loopLatency; // Loop Latency
|
int loopLatency; // Loop Latency
|
||||||
int loopFudgeFactor; // Add to memReadLatency to get loopLatency
|
int loopFudgeFactor; // Add to memReadLatency to get loopLatency
|
||||||
char *name;
|
const char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ void TDFX_WaitForIdle();
|
|||||||
// Write a value to an 32-bit reg using a mask. The mask selects the
|
// Write a value to an 32-bit reg using a mask. The mask selects the
|
||||||
// bits to be modified.
|
// bits to be modified.
|
||||||
#define OUTREGM(addr, value, mask) \
|
#define OUTREGM(addr, value, mask) \
|
||||||
(OUTREG(addr, (INREG(addr) & ~mask) | (value & mask)))
|
(OUTREG(addr, (INREG(addr) & ~(mask)) | ((value) & (mask))))
|
||||||
|
|
||||||
|
|
||||||
#endif // _ACCELERANT_H
|
#endif // _ACCELERANT_H
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ void Rage128_SetFunctionPointers(void);
|
|||||||
// Write a value to an 32-bit reg using a mask. The mask selects the
|
// Write a value to an 32-bit reg using a mask. The mask selects the
|
||||||
// bits to be modified.
|
// bits to be modified.
|
||||||
#define OUTREGM(addr, value, mask) \
|
#define OUTREGM(addr, value, mask) \
|
||||||
(OUTREG(addr, (INREG(addr) & ~mask) | (value & mask)))
|
(OUTREG(addr, (INREG(addr) & ~(mask)) | ((value) & (mask))))
|
||||||
|
|
||||||
|
|
||||||
#endif // _ACCELERANT_H
|
#endif // _ACCELERANT_H
|
||||||
|
|||||||
@@ -72,13 +72,13 @@ Rage128_SetDPMSMode(uint32 dpmsMode)
|
|||||||
case B_DPMS_STAND_BY:
|
case B_DPMS_STAND_BY:
|
||||||
// Screen: Off; HSync: Off, VSync: On.
|
// Screen: Off; HSync: Off, VSync: On.
|
||||||
OUTREGM(R128_CRTC_EXT_CNTL,
|
OUTREGM(R128_CRTC_EXT_CNTL,
|
||||||
(R128_CRTC_DISPLAY_DIS | R128_CRTC_HSYNC_DIS), mask);
|
R128_CRTC_DISPLAY_DIS | R128_CRTC_HSYNC_DIS, mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_DPMS_SUSPEND:
|
case B_DPMS_SUSPEND:
|
||||||
// Screen: Off; HSync: On, VSync: Off.
|
// Screen: Off; HSync: On, VSync: Off.
|
||||||
OUTREGM(R128_CRTC_EXT_CNTL,
|
OUTREGM(R128_CRTC_EXT_CNTL,
|
||||||
(R128_CRTC_DISPLAY_DIS | R128_CRTC_VSYNC_DIS), mask);
|
R128_CRTC_DISPLAY_DIS | R128_CRTC_VSYNC_DIS, mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_DPMS_OFF:
|
case B_DPMS_OFF:
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
// Memory Specifications from RAGE 128 Software Development Manual
|
// Memory Specifications from RAGE 128 Software Development Manual
|
||||||
// (Technical Reference Manual P/N SDK-G04000 Rev 0.01), page 3-21.
|
// (Technical Reference Manual P/N SDK-G04000 Rev 0.01), page 3-21.
|
||||||
static R128_RAMSpec sRAMSpecs[] = {
|
static R128_RAMSpec sRAMSpecs[] = {
|
||||||
{ 4, 4, 3, 3, 1, 3, 1, 16, 12, (char *)"128-bit SDR SGRAM 1:1" },
|
{ 4, 4, 3, 3, 1, 3, 1, 16, 12, "128-bit SDR SGRAM 1:1" },
|
||||||
{ 4, 8, 3, 3, 1, 3, 1, 17, 13, (char *)"64-bit SDR SGRAM 1:1" },
|
{ 4, 8, 3, 3, 1, 3, 1, 17, 13, "64-bit SDR SGRAM 1:1" },
|
||||||
{ 4, 4, 1, 2, 1, 2, 1, 16, 12, (char *)"64-bit SDR SGRAM 2:1" },
|
{ 4, 4, 1, 2, 1, 2, 1, 16, 12, "64-bit SDR SGRAM 2:1" },
|
||||||
{ 4, 4, 3, 3, 2, 3, 1, 16, 12, (char *)"64-bit DDR SGRAM" },
|
{ 4, 4, 3, 3, 2, 3, 1, 16, 12, "64-bit DDR SGRAM" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ SetRegisters(DisplayParams& params)
|
|||||||
|
|
||||||
OUTREG(R128_CRTC_GEN_CNTL, params.crtc_gen_cntl);
|
OUTREG(R128_CRTC_GEN_CNTL, params.crtc_gen_cntl);
|
||||||
|
|
||||||
OUTREGM(R128_DAC_CNTL, (R128_DAC_MASK_ALL | R128_DAC_8BIT_EN),
|
OUTREGM(R128_DAC_CNTL, R128_DAC_MASK_ALL | R128_DAC_8BIT_EN,
|
||||||
~(R128_DAC_RANGE_CNTL | R128_DAC_BLANKING));
|
~(R128_DAC_RANGE_CNTL | R128_DAC_BLANKING));
|
||||||
|
|
||||||
OUTREG(R128_CRTC_H_TOTAL_DISP, params.crtc_h_total_disp);
|
OUTREG(R128_CRTC_H_TOTAL_DISP, params.crtc_h_total_disp);
|
||||||
@@ -393,7 +393,7 @@ Rage128_SetDisplayMode(const DisplayModeEx& mode)
|
|||||||
|
|
||||||
// Select primary monitor and enable 8-bit color.
|
// Select primary monitor and enable 8-bit color.
|
||||||
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
||||||
(R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN));
|
R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN);
|
||||||
OUTREG8(R128_PALETTE_INDEX, 0); // set first color index
|
OUTREG8(R128_PALETTE_INDEX, 0); // set first color index
|
||||||
|
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 0; i < 256; i++)
|
||||||
@@ -436,7 +436,7 @@ Rage128_SetIndexedColors(uint count, uint8 first, uint8* colorData, uint32 flags
|
|||||||
|
|
||||||
// Select primary monitor and enable 8-bit color.
|
// Select primary monitor and enable 8-bit color.
|
||||||
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
||||||
(R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN));
|
R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN);
|
||||||
OUTREG8(R128_PALETTE_INDEX, first); // set first color index
|
OUTREG8(R128_PALETTE_INDEX, first); // set first color index
|
||||||
|
|
||||||
while (count--) {
|
while (count--) {
|
||||||
|
|||||||
@@ -1096,8 +1096,11 @@ static struct fw_xfer *
|
|||||||
fw_tl2xfer(struct firewire_comm *fc, int node, int tlabel, int tcode)
|
fw_tl2xfer(struct firewire_comm *fc, int node, int tlabel, int tcode)
|
||||||
{
|
{
|
||||||
struct fw_xfer *xfer;
|
struct fw_xfer *xfer;
|
||||||
|
int s;
|
||||||
int req;
|
int req;
|
||||||
|
|
||||||
|
s = splfw();
|
||||||
|
|
||||||
mtx_lock(&fc->tlabel_lock);
|
mtx_lock(&fc->tlabel_lock);
|
||||||
STAILQ_FOREACH(xfer, &fc->tlabels[tlabel], tlabel)
|
STAILQ_FOREACH(xfer, &fc->tlabels[tlabel], tlabel)
|
||||||
if(xfer->send.hdr.mode.hdr.dst == node) {
|
if(xfer->send.hdr.mode.hdr.dst == node) {
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow ()
|
|||||||
{
|
{
|
||||||
char numberString [30];
|
char numberString [30];
|
||||||
BRect tempRect;
|
BRect tempRect;
|
||||||
char *tempStringPntr;
|
const char *tempStringPntr;
|
||||||
|
|
||||||
SetViewColor (ui_color (B_PANEL_BACKGROUND_COLOR));
|
SetViewColor (ui_color (B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow ()
|
|||||||
|
|
||||||
tempRect.right = fNoWordsMeansSpamCheckBoxPntr->Frame().left -
|
tempRect.right = fNoWordsMeansSpamCheckBoxPntr->Frame().left -
|
||||||
be_plain_font->StringWidth ("a");
|
be_plain_font->StringWidth ("a");
|
||||||
tempStringPntr = (char *)"Spam above:";
|
tempStringPntr = "Spam above:";
|
||||||
sprintf (numberString, "%06.4f", (double) fSpamCutoffRatio);
|
sprintf (numberString, "%06.4f", (double) fSpamCutoffRatio);
|
||||||
fSpamCutoffRatioTextBoxPntr = new BTextControl (
|
fSpamCutoffRatioTextBoxPntr = new BTextControl (
|
||||||
tempRect,
|
tempRect,
|
||||||
@@ -228,7 +228,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow ()
|
|||||||
|
|
||||||
// Add the box displaying the genuine cutoff ratio, on a line by itself.
|
// Add the box displaying the genuine cutoff ratio, on a line by itself.
|
||||||
|
|
||||||
tempStringPntr = (char *)"Genuine below and uncertain above:";
|
tempStringPntr = "Genuine below and uncertain above:";
|
||||||
sprintf (numberString, "%08.6f", (double) fGenuineCutoffRatio);
|
sprintf (numberString, "%08.6f", (double) fGenuineCutoffRatio);
|
||||||
fGenuineCutoffRatioTextBoxPntr = new BTextControl (
|
fGenuineCutoffRatioTextBoxPntr = new BTextControl (
|
||||||
tempRect,
|
tempRect,
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ struct frac pad_rate[2] = {
|
|||||||
{203, 2997}, /* = (8000 - 29.97 * 250)/(29.97 * 250) */
|
{203, 2997}, /* = (8000 - 29.97 * 250)/(29.97 * 250) */
|
||||||
{1, 15}, /* = (8000 - 25 * 300)/(25 * 300) */
|
{1, 15}, /* = (8000 - 25 * 300)/(25 * 300) */
|
||||||
};
|
};
|
||||||
char *system_name[] = {(char *)"NTSC", (char *)"PAL"};
|
const char *system_name[] = {"NTSC", "PAL"};
|
||||||
int frame_rate[] = {30, 25};
|
int frame_rate[] = {30, 25};
|
||||||
|
|
||||||
#define DV_PSIZE 512
|
#define DV_PSIZE 512
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ OpenSoundAddOn::OpenSoundAddOn(image_id image) :
|
|||||||
fInitCheckStatus = B_NO_INIT;
|
fInitCheckStatus = B_NO_INIT;
|
||||||
|
|
||||||
/* unix paths */
|
/* unix paths */
|
||||||
if (RecursiveScan((char *)"/dev/oss/") != B_OK)
|
if (RecursiveScan("/dev/oss/") != B_OK)
|
||||||
return;
|
return;
|
||||||
/*
|
/*
|
||||||
if (RecursiveScan("/dev/audio/oss/") != B_OK)
|
if (RecursiveScan("/dev/audio/oss/") != B_OK)
|
||||||
@@ -193,7 +193,7 @@ status_t OpenSoundAddOn::AutoStart(
|
|||||||
}
|
}
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
OpenSoundAddOn::RecursiveScan(char* rootPath, BEntry *rootEntry)
|
OpenSoundAddOn::RecursiveScan(const char* rootPath, BEntry *rootEntry)
|
||||||
{
|
{
|
||||||
status_t err;
|
status_t err;
|
||||||
int mixer;
|
int mixer;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class OpenSoundAddOn :
|
|||||||
/************************/
|
/************************/
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t RecursiveScan(char* path, BEntry *rootEntry = NULL);
|
status_t RecursiveScan(const char* path, BEntry *rootEntry = NULL);
|
||||||
void SaveSettings(void);
|
void SaveSettings(void);
|
||||||
void LoadSettings(void);
|
void LoadSettings(void);
|
||||||
|
|
||||||
|
|||||||
@@ -485,9 +485,9 @@ OpenSoundNode::NodeRegistered()
|
|||||||
mediaInput.destination.port = ControlPort();
|
mediaInput.destination.port = ControlPort();
|
||||||
mediaInput.destination.id = fInputs.CountItems();
|
mediaInput.destination.id = fInputs.CountItems();
|
||||||
mediaInput.node = Node();
|
mediaInput.node = Node();
|
||||||
char *prefix = (char *)"";
|
const char *prefix = "";
|
||||||
if (strstr(engine->Info()->name, "SPDIF"))
|
if (strstr(engine->Info()->name, "SPDIF"))
|
||||||
prefix = (char *)"S/PDIF ";
|
prefix = "S/PDIF ";
|
||||||
sprintf(mediaInput.name, "%sOutput %ld (%s)", prefix,
|
sprintf(mediaInput.name, "%sOutput %ld (%s)", prefix,
|
||||||
mediaInput.destination.id, gSupportedFormatsNames[f]);
|
mediaInput.destination.id, gSupportedFormatsNames[f]);
|
||||||
|
|
||||||
@@ -533,9 +533,9 @@ OpenSoundNode::NodeRegistered()
|
|||||||
mediaOutput.source.port = ControlPort();
|
mediaOutput.source.port = ControlPort();
|
||||||
mediaOutput.source.id = fOutputs.CountItems();
|
mediaOutput.source.id = fOutputs.CountItems();
|
||||||
mediaOutput.node = Node();
|
mediaOutput.node = Node();
|
||||||
char *prefix = (char *)"";
|
const char *prefix = "";
|
||||||
if (strstr(engine->Info()->name, "SPDIF"))
|
if (strstr(engine->Info()->name, "SPDIF"))
|
||||||
prefix = (char *)"S/PDIF ";
|
prefix = "S/PDIF ";
|
||||||
sprintf(mediaOutput.name, "%sInput %ld (%s)", prefix,
|
sprintf(mediaOutput.name, "%sInput %ld (%s)", prefix,
|
||||||
mediaOutput.source.id, gSupportedFormatsNames[f]);
|
mediaOutput.source.id, gSupportedFormatsNames[f]);
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ TrackSlider::_InitBitmap()
|
|||||||
|
|
||||||
fBitmap = new BBitmap(rect, BScreen().ColorSpace(), true);
|
fBitmap = new BBitmap(rect, BScreen().ColorSpace(), true);
|
||||||
|
|
||||||
fBitmapView = new SliderOffscreenView(rect.OffsetToSelf(B_ORIGIN), (char *)"bitmapView");
|
fBitmapView = new SliderOffscreenView(rect.OffsetToSelf(B_ORIGIN), "bitmapView");
|
||||||
fBitmap->AddChild(fBitmapView);
|
fBitmap->AddChild(fBitmapView);
|
||||||
|
|
||||||
fBitmapView->fRight = Bounds().right - kLeftRightTrackSliderWidth;
|
fBitmapView->fRight = Bounds().right - kLeftRightTrackSliderWidth;
|
||||||
@@ -477,7 +477,7 @@ TrackSlider::FrameResized(float width, float height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SliderOffscreenView::SliderOffscreenView(BRect frame, char *name)
|
SliderOffscreenView::SliderOffscreenView(BRect frame, const char *name)
|
||||||
: BView(frame, name, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW),
|
: BView(frame, name, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW),
|
||||||
leftBitmap(BRect(BPoint(0,0), kLeftRightTrackSliderSize), B_CMAP8),
|
leftBitmap(BRect(BPoint(0,0), kLeftRightTrackSliderSize), B_CMAP8),
|
||||||
rightBitmap(BRect(BPoint(0,0), kLeftRightTrackSliderSize), B_CMAP8),
|
rightBitmap(BRect(BPoint(0,0), kLeftRightTrackSliderSize), B_CMAP8),
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
class SliderOffscreenView : public BView {
|
class SliderOffscreenView : public BView {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SliderOffscreenView(BRect frame, char *name);
|
SliderOffscreenView(BRect frame, const char *name);
|
||||||
virtual ~SliderOffscreenView();
|
virtual ~SliderOffscreenView();
|
||||||
virtual void DrawX();
|
virtual void DrawX();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user