removed/fixed warnings

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4418 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2003-08-31 02:18:11 +00:00
parent 188b5de0bf
commit d91580cd9a
32 changed files with 76 additions and 124 deletions

View File

@ -26,11 +26,11 @@
#define SYSTEM_TIMESOURCE_CONTROL_PORT -666
#define IS_SYSTEM_TIMESOURCE(_node) ((_node).node > 0 && (_node).port == SYSTEM_TIMESOURCE_CONTROL_PORT)
#define NODE_KIND_USER_MASK 0x00000000FFFFFFFFLL
#define NODE_KIND_COMPARE_MASK 0x000000007FFFFFFFLL
#define NODE_KIND_NO_REFCOUNTING 0x0000000080000000LL
#define NODE_KIND_SHADOW_TIMESOURCE 0x0000000100000000LL
#define NODE_KIND_SYSTEM_TIMESOURCE 0x0000000200000000LL
#define NODE_KIND_USER_MASK 0x00000000FFFFFFFFULL
#define NODE_KIND_COMPARE_MASK 0x000000007FFFFFFFULL
#define NODE_KIND_NO_REFCOUNTING 0x0000000080000000ULL
#define NODE_KIND_SHADOW_TIMESOURCE 0x0000000100000000ULL
#define NODE_KIND_SYSTEM_TIMESOURCE 0x0000000200000000ULL
#define ROUND_UP_TO_PAGE(size) (((size) + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1))

View File

@ -615,7 +615,7 @@ AudioMixer::LatencyChanged(const media_source & source, const media_destination
MixerInput *input;
for (int i = 0; (input = fCore->Input(i)) != 0; i++) {
TRACE("AudioMixer: SendLatencyChange from %d/%d to %d/%d event latency is now %Ld\n",
TRACE("AudioMixer: SendLatencyChange from %ld/%ld to %ld/%ld event latency is now %Ld\n",
input->MediaInput().source.port, input->MediaInput().source.id,
input->MediaInput().destination.port, input->MediaInput().destination.id,
EventLatency());
@ -1066,7 +1066,7 @@ status_t
AudioMixer::GetParameterValue(int32 id, bigtime_t *last_change,
void *value, size_t *ioSize)
{
TRACE("GetParameterValue: id 0x%08x, ioSize %ld\n", id, *ioSize);
TRACE("GetParameterValue: id 0x%08lx, ioSize %ld\n", id, *ioSize);
int param = PARAM(id);
fCore->Lock();
if (PARAM_IS_ETC(id)) {
@ -1253,7 +1253,7 @@ void
AudioMixer::SetParameterValue(int32 id, bigtime_t when,
const void *value, size_t size)
{
TRACE("SetParameterValue: id 0x%08x, size %ld\n", id, size);
TRACE("SetParameterValue: id 0x%08lx, size %ld\n", id, size);
bool update = false;
int param = PARAM(id);
fCore->Lock();
@ -1498,7 +1498,6 @@ AudioMixer::UpdateParameterWeb()
BParameterGroup *group;
BParameterGroup *subgroup;
BParameterGroup *subsubgroup;
BParameterGroup *subsubsubgroup;
BDiscreteParameter *dp;
MixerInput *in;
MixerOutput *out;

View File

@ -47,8 +47,8 @@ MixerCore::MixerCore(AudioMixer *node)
fMixBuffer(0),
fMixBufferFrameRate(0),
fMixBufferFrameCount(0),
fMixBufferChannelTypes(0),
fMixBufferChannelCount(0),
fMixBufferChannelTypes(0),
fDoubleRateMixing(DOUBLE_RATE_MIXING),
fDownstreamLatency(1),
fSettings(new MixerSettings),

View File

@ -106,7 +106,7 @@ MixerInput::BufferReceived(BBuffer *buffer)
if (fInputByteSwap)
fInputByteSwap->Swap(data, size);
int32 offset = frames_for_duration(fMixBufferFrameRate, start) % fMixBufferFrameCount;
int offset = frames_for_duration(fMixBufferFrameRate, start) % fMixBufferFrameCount;
PRINT(4, "MixerInput::BufferReceived: buffer start %10Ld, offset %6d\n", start, offset);
@ -183,7 +183,7 @@ MixerInput::ID()
return fInput.destination.id;
}
uint32
int
MixerInput::GetInputChannelCount()
{
return fInputChannelCount;
@ -327,7 +327,7 @@ MixerInput::UpdateInputChannelDestinationMask()
}
for (int i = 0; i < fInputChannelCount; i++)
TRACE("UpdateInputChannelDestinationMask: input channel %d, destination_mask 0x%08X, base %p, gain %.3f\n", i, fInputChannelInfo[i].destination_mask, fInputChannelInfo[i].buffer_base, fInputChannelInfo[i].gain);
TRACE("UpdateInputChannelDestinationMask: input channel %d, destination_mask 0x%08lX, base %p, gain %.3f\n", i, fInputChannelInfo[i].destination_mask, fInputChannelInfo[i].buffer_base, fInputChannelInfo[i].gain);
TRACE("UpdateInputChannelDestinationMask: leave\n");
}
@ -335,24 +335,24 @@ MixerInput::UpdateInputChannelDestinationMask()
void
MixerInput::UpdateInputChannelDestinations()
{
uint32 channel_count;
int channel_count;
uint32 all_bits;
uint32 mask;
TRACE("UpdateInputChannelDestinations: enter\n");
for (int i = 0; i < fInputChannelCount; i++)
TRACE("UpdateInputChannelDestinations: input channel %d, destination_mask 0x%08X, base %p, gain %.3f\n", i, fInputChannelInfo[i].destination_mask, fInputChannelInfo[i].buffer_base, fInputChannelInfo[i].gain);
TRACE("UpdateInputChannelDestinations: input channel %d, destination_mask 0x%08lX, base %p, gain %.3f\n", i, fInputChannelInfo[i].destination_mask, fInputChannelInfo[i].buffer_base, fInputChannelInfo[i].gain);
all_bits = 0;
for (int i = 0; i < fInputChannelCount; i++)
all_bits |= fInputChannelInfo[i].destination_mask;
TRACE("UpdateInputChannelDestinations: all_bits = %08x\n", all_bits);
TRACE("UpdateInputChannelDestinations: all_bits = %08lx\n", all_bits);
channel_count = count_nonzero_bits(all_bits);
TRACE("UpdateInputChannelDestinations: %ld input channels, %ld mixer channels (%ld old)\n", fInputChannelCount, channel_count, fMixerChannelCount);
TRACE("UpdateInputChannelDestinations: %d input channels, %d mixer channels (%d old)\n", fInputChannelCount, channel_count, fMixerChannelCount);
if (channel_count != fMixerChannelCount) {
delete [] fMixerChannelInfo;
@ -362,7 +362,8 @@ MixerInput::UpdateInputChannelDestinations()
// assign each mixer channel one type
// and the gain from the fChannelTypeGain[]
for (int i = 0, mask = 1; i < fMixerChannelCount; i++) {
mask = 1;
for (int i = 0; i < fMixerChannelCount; i++) {
while (mask != 0 && (all_bits & mask) == 0)
mask <<= 1;
fMixerChannelInfo[i].destination_type = ChannelMaskToChannelType(mask);
@ -371,7 +372,7 @@ MixerInput::UpdateInputChannelDestinations()
}
// assign buffer_base pointer for each mixer channel
for (int i = 0; i < fMixerChannelCount; i++) {
for (int i = 0; i < fMixerChannelCount; i++) {
int j;
for (j = 0; j < fInputChannelCount; j++) {
if (fInputChannelInfo[j].destination_mask & ChannelTypeToChannelMask(fMixerChannelInfo[i].destination_type)) {
@ -502,7 +503,7 @@ MixerInput::SetMixBufferFormat(int32 framerate, int32 frames)
TRACE(" inputBufferLength %10Ld\n", inputBufferLength);
TRACE(" outputBufferLength %10Ld\n", outputBufferLength);
TRACE(" mixerBufferLength %10Ld\n", mixerBufferLength);
TRACE(" fMixBufferFrameCount %10ld\n", fMixBufferFrameCount);
TRACE(" fMixBufferFrameCount %10d\n", fMixBufferFrameCount);
ASSERT((fMixBufferFrameCount % frames) == 0);

View File

@ -15,14 +15,14 @@ public:
MixerInput(MixerCore *core, const media_input &input, float mixFrameRate, int32 mixFrameCount);
~MixerInput();
int32 ID();
int32 ID();
void BufferReceived(BBuffer *buffer);
void BufferReceived(BBuffer *buffer);
media_input & MediaInput();
// The physical input channels
uint32 GetInputChannelCount();
int GetInputChannelCount();
int GetInputChannelType(int channel);
void SetInputChannelGain(int channel, float gain);
float GetInputChannelGain(int channel);
@ -36,16 +36,16 @@ public:
int GetInputChannelForDestination(int destination_type); // returns -1 if not found
// The virtual mixer channels that are generated from destinations
uint32 GetMixerChannelCount();
int GetMixerChannelCount();
void SetMixerChannelGain(int mixer_channel, float gain);
float GetMixerChannelGain(int mixer_channel);
int GetMixerChannelType(int mixer_channel);
void SetEnabled(bool yesno);
bool IsEnabled();
void SetEnabled(bool yesno);
bool IsEnabled();
// only for use by MixerCore
bool GetMixerChannelInfo(int mixer_channel, int64 framepos, bigtime_t time, const float **buffer, uint32 *sample_offset, int *type, float *gain);
bool GetMixerChannelInfo(int mixer_channel, int64 framepos, bigtime_t time, const float **buffer, uint32 *sample_offset, int *type, float *gain);
protected:
friend class MixerCore;
@ -57,12 +57,12 @@ private:
private:
struct input_chan_info {
float *buffer_base;
uint32 destination_mask; // multiple or no bits sets
float gain;
float *buffer_base;
uint32 destination_mask; // multiple or no bits sets
float gain;
};
struct mixer_chan_info {
float *buffer_base;
float *buffer_base;
int destination_type;
float destination_gain;
};
@ -77,16 +77,16 @@ private:
bool fEnabled;
input_chan_info *fInputChannelInfo; // array
uint32 fInputChannelCount;
int fInputChannelCount;
uint32 fInputChannelMask;
mixer_chan_info *fMixerChannelInfo; // array
uint32 fMixerChannelCount;
int fMixerChannelCount;
float *fMixBuffer;
int32 fMixBufferFrameRate;
uint32 fMixBufferFrameCount;
int fMixBufferFrameCount;
bigtime_t fLastDataAvailableTime;
@ -98,7 +98,7 @@ private:
int32 debugMixBufferFrames;
};
inline uint32
inline int
MixerInput::GetMixerChannelCount()
{
return fMixerChannelCount;

View File

@ -65,7 +65,7 @@ void
MixerOutput::UpdateOutputChannels()
{
output_chan_info *oldInfo = fOutputChannelInfo;
uint32 oldCount = fOutputChannelCount;
int oldCount = fOutputChannelCount;
fOutputChannelCount = fOutput.format.u.raw_audio.channel_count;
fOutputChannelInfo = new output_chan_info[fOutputChannelCount];
@ -87,11 +87,11 @@ MixerOutput::UpdateOutputChannels()
for (int i = 0; i < fOutputChannelCount; i++) {
for (int j = 0; j < oldCount; j++) {
if (fOutputChannelInfo[i].channel_type == oldInfo[j].channel_type) {
fOutputChannelInfo[i].channel_gain == oldInfo[j].channel_gain;
fOutputChannelInfo[i].source_count == oldInfo[j].source_count;
fOutputChannelInfo[i].channel_gain = oldInfo[j].channel_gain;
fOutputChannelInfo[i].source_count = oldInfo[j].source_count;
for (int k = 0; k < fOutputChannelInfo[i].source_count; k++) {
fOutputChannelInfo[i].source_gain[k] == oldInfo[j].source_gain[k];
fOutputChannelInfo[i].source_type[k] == oldInfo[j].source_type[k];
fOutputChannelInfo[i].source_gain[k] = oldInfo[j].source_gain[k];
fOutputChannelInfo[i].source_type[k] = oldInfo[j].source_type[k];
}
// also copy the old gain cache
for (int k = 0; k < MAX_CHANNEL_TYPES; k++)
@ -111,7 +111,7 @@ void
MixerOutput::AssignDefaultSources()
{
uint32 mask = fOutput.format.u.raw_audio.channel_mask;
uint32 count = fOutputChannelCount;
int count = fOutputChannelCount;
// assign default sources for a few known setups,
// everything else is left unchanged (it already is 1:1)

View File

@ -28,7 +28,7 @@ public:
void ChangeFormat(const media_multi_audio_format &format);
// The physical output channels
uint32 GetOutputChannelCount();
int GetOutputChannelCount();
int GetOutputChannelType(int channel);
void SetOutputChannelGain(int channel, float gain);
float GetOutputChannelGain(int channel);
@ -47,7 +47,7 @@ public:
// Only for use by MixerCore:
// For iteration of a channel's sources
uint32 GetOutputChannelSourceCount(int channel);
int GetOutputChannelSourceCount(int channel);
void GetOutputChannelSourceInfoAt(int channel, int source_index, int *source_type, float *source_gain);
// To swap byteorder in a buffer is that is needed
@ -79,14 +79,14 @@ private:
MixerCore *fCore;
media_output fOutput;
uint32 fOutputChannelCount;
int fOutputChannelCount;
output_chan_info *fOutputChannelInfo; //array
ByteSwap *fOutputByteSwap;
bool fMuted;
};
inline uint32 MixerOutput::GetOutputChannelCount()
inline int MixerOutput::GetOutputChannelCount()
{
return fOutputChannelCount;
}
@ -98,7 +98,7 @@ inline float MixerOutput::GetOutputChannelGain(int channel)
return fOutputChannelInfo[channel].channel_gain;
}
inline uint32 MixerOutput::GetOutputChannelSourceCount(int channel)
inline int MixerOutput::GetOutputChannelSourceCount(int channel)
{
ASSERT(channel >= 0 && channel < fOutputChannelCount);
return fOutputChannelInfo[channel].source_count;

View File

@ -13,7 +13,7 @@
#define SAVE_DELAY 5000000 // delay saving of settings for 5s
#define SAVE_RUNTIME 30000000 // stop save thread after 30s inactivity
#define SETTINGS_VERSION 0x94251601
#define SETTINGS_VERSION ((int32)0x94251601)
MixerSettings::MixerSettings()
: fLocker(new BLocker),
@ -360,7 +360,6 @@ MixerSettings::Save()
for (int i = 0; i < MAX_INPUT_SETTINGS; i++)
msg.AddMessage("input", &fInputSetting[i]);
size_t size;
char *buffer;
size_t length;

View File

@ -43,7 +43,7 @@ StringForChannelMask(char *str, uint32 mask)
DECODE(B_CHANNEL_MONO, "Mono");
#undef DECODE
if (mask)
sprintf(str + strlen(str), "0x%08X", mask);
sprintf(str + strlen(str), "0x%08lX", mask);
return str;
}

View File

@ -2,7 +2,7 @@
#define _MIXER_UTILS_H
#if DEBUG > 0
#define PRINT_CHANNEL_MASK(fmt) do { char s[200]; StringForChannelMask(s, (fmt).u.raw_audio.channel_mask); printf(" channel_mask 0x%08X %s\n", (fmt).u.raw_audio.channel_mask, s); } while (0)
#define PRINT_CHANNEL_MASK(fmt) do { char s[200]; StringForChannelMask(s, (fmt).u.raw_audio.channel_mask); printf(" channel_mask 0x%08lX %s\n", (fmt).u.raw_audio.channel_mask, s); } while (0)
#else
#define PRINT_CHANNEL_MASK(fmt) ((void)0)
#endif

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <MediaDefs.h>
#include <Buffer.h>
#include "SharedBufferList.h"

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <BufferConsumer.h>
#include <BufferProducer.h>
#include <BufferGroup.h>

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <BufferGroup.h>
#include <Buffer.h>
#include "debug.h"

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <BufferProducer.h>
#include <BufferConsumer.h>
#include <BufferGroup.h>

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
/* Converts mono into stereo, stereo into mono
* (multiple channel support should be added in the future)
*/

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <OS.h>
#include <Controllable.h>
#include <ParameterWeb.h>
@ -214,7 +211,7 @@ BControllable::HandleMessage(int32 message, const void *data, size_t size)
if (rv != B_OK) {
ERROR("BControllable::HandleMessage CONTROLLABLE_GET_PARAMETER_WEB Flatten failed\n");
} else {
printf("BControllable::HandleMessage CONTROLLABLE_GET_PARAMETER_WEB %ld bytes, 0x%08x, 0x%08x, 0x%08x, 0x%08x\n",
printf("BControllable::HandleMessage CONTROLLABLE_GET_PARAMETER_WEB %ld bytes, 0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx\n",
reply.size, ((uint32*)buffer)[0], ((uint32*)buffer)[1], ((uint32*)buffer)[2], ((uint32*)buffer)[3]);
}
delete_area(area);

View File

@ -251,9 +251,11 @@ MessageFilter::FilterFor(BView *view, BParameter &parameter)
case BParameter::B_DISCRETE_PARAMETER:
return new DiscreteMessageFilter(control, static_cast<BDiscreteParameter &>(parameter));
case BParameter::B_NULL_PARAMETER: /* fall through */
default:
return NULL;
}
return NULL;
}
@ -519,7 +521,7 @@ DefaultMediaTheme::MakeViewFor(BParameterGroup &group, const BRect &hintRect)
rect.right = rect.left + 50;
rect.bottom = rect.top + 10;
float lastHeight;
float lastHeight = 0;
for (int32 i = 0; i < group.CountGroups(); i++) {
BParameterGroup *subGroup = group.GroupAt(i);

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
/* This is a management class for dormant media nodes.
* It is private to the media kit and only accessed by the BMediaRoster class
* and the media_addon_server.

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <MediaAddOn.h>
#include <string.h>
#include <malloc.h>

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <MediaEventLooper.h>
#include <TimeSource.h>
#include <scheduler.h>

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <MediaRoster.h>
#include <MediaNode.h>
#include <TimeSource.h>

View File

@ -28,7 +28,7 @@
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <MediaRoster.h>
#include <Locker.h>
@ -1885,7 +1885,7 @@ BMediaRoster::GetParameterWebFor(const media_node & node,
// we got a flattened parameter web!
*out_web = new BParameterWeb();
printf("BMediaRoster::GetParameterWebFor Unflattening %ld bytes, 0x%08x, 0x%08x, 0x%08x, 0x%08x\n",
printf("BMediaRoster::GetParameterWebFor Unflattening %ld bytes, 0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx\n",
reply.size, ((uint32*)data)[0], ((uint32*)data)[1], ((uint32*)data)[2], ((uint32*)data)[3]);
rv = (*out_web)->Unflatten(reply.code, data, reply.size);
@ -2124,7 +2124,7 @@ BMediaRoster::InstantiateDormantNode(const dormant_node_info & in_info,
return B_BAD_VALUE;
}
printf("BMediaRoster::InstantiateDormantNode: addon-id %ld, flavor_id %ld, flags 0x%X\n", in_info.addon, in_info.flavor_id, flags);
printf("BMediaRoster::InstantiateDormantNode: addon-id %ld, flavor_id %ld, flags 0x%lX\n", in_info.addon, in_info.flavor_id, flags);
// Get flavor_info from the server
// XXX this is a little overhead, as we get the full blown dormant_flavor_info,
@ -2139,7 +2139,7 @@ BMediaRoster::InstantiateDormantNode(const dormant_node_info & in_info,
ASSERT(node_info.internal_id == in_info.flavor_id);
printf("BMediaRoster::InstantiateDormantNode: name \"%s\", info \"%s\", flavor_flags 0x%X, internal_id %ld, possible_count %ld\n",
printf("BMediaRoster::InstantiateDormantNode: name \"%s\", info \"%s\", flavor_flags 0x%lX, internal_id %ld, possible_count %ld\n",
node_info.name, node_info.info, node_info.flavor_flags, node_info.internal_id, node_info.possible_count);
#if DEBUG

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
/* This is a interface class for media kit notifications.
* It is private to the media kit which uses it to pass
* notifications up to the media_server which will broadcast

View File

@ -136,11 +136,11 @@ const char * const B_SIMPLE_TRANSPORT = "SimpleTransport";
// Flattened data
static const int32 kParameterWebMagic = 0x01030506;
static const int32 kCurrentParameterWebVersion = 1;
static const int32 kBufferGroupMagic = 0x03040509;
static const int32 kBufferGroupMagicNoFlags = 0x03040507;
static const int32 kParameterMagic = 0x02040607;
static const uint32 kParameterWebMagic = 0x01030506;
static const uint32 kBufferGroupMagic = 0x03040509;
static const uint32 kBufferGroupMagicNoFlags = 0x03040507;
static const uint32 kParameterMagic = 0x02040607;
static const ssize_t kAdditionalParameterGroupSize = 12;
static const ssize_t kAdditionalParameterSize = 35;
@ -581,7 +581,7 @@ BParameterWeb::Unflatten(type_code code, const void *buffer, ssize_t size)
const void *bufferStart = buffer;
int32 magic = read_from_buffer<int32>(&buffer);
uint32 magic = read_from_buffer<uint32>(&buffer);
bool isSwapped = false;
if (magic == B_SWAP_INT32(kParameterWebMagic)) {
@ -964,9 +964,6 @@ BParameterGroup::Flatten(void *buffer, ssize_t size) const
return B_NO_INIT;
}
void *bufferStart = buffer;
// used to compute the rest length of the buffer when needed
// NOTICE: It is important that this value is the size returned by
// BParameterGroup::FlattenedSize, not by a descendent's override of this method.
ssize_t actualSize = BParameterGroup::FlattenedSize();
@ -1071,7 +1068,7 @@ BParameterGroup::Unflatten(type_code code, const void *buffer, ssize_t size)
const void *bufferStart = buffer;
// used to compute the rest length of the buffer when needed
int32 magic = read_from_buffer<int32>(&buffer);
uint32 magic = read_from_buffer<uint32>(&buffer);
bool isSwapped = false;
if (magic == B_SWAP_INT32(kBufferGroupMagic)
@ -1701,7 +1698,7 @@ BParameter::Unflatten(type_code code, const void *buffer, ssize_t size)
// check magic
int32 magic = read_from_buffer<int32>(&buffer);
uint32 magic = read_from_buffer<uint32>(&buffer);
if (magic == B_SWAP_INT32(kParameterMagic))
mSwapDetected = true;
else if (magic == kParameterMagic)
@ -2294,7 +2291,7 @@ BDiscreteParameter::Unflatten(type_code code, const void *buffer, ssize_t size)
if (read_string_from_buffer(&buffer, &name, size_left(size, bufferStart, buffer)) < B_OK)
return B_BAD_DATA;
if (size_left(size, bufferStart, buffer) < sizeof(int32))
if (size_left(size, bufferStart, buffer) < (int)sizeof(int32))
return B_BAD_DATA;
int32 value = read_from_buffer_swap32<int32>(&buffer, SwapOnUnflatten());

View File

@ -626,7 +626,7 @@ _SoundPlayNode::HandleDataStatus(
bigtime_t lateness,
bool realTimeEvent = false)
{
TRACE("_SoundPlayNode::HandleDataStatus status:%li, lateness:%li\n", event->data, lateness);
TRACE("_SoundPlayNode::HandleDataStatus status: %li, lateness: %Li\n", event->data, lateness);
switch(event->data) {
case B_DATA_NOT_AVAILABLE:
break;

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
/* Implements _event_queue_imp used by BTimedEventQueue, not thread save!
*/
#include <TimedEventQueue.h>

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
/*
* The undocumented BTrackReader class,
* used by BSound and the GameSound classes

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <OS.h>
#include <Application.h>
#include <Roster.h>

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <OS.h>
#include <Entry.h>
#include <Message.h>
@ -189,7 +186,9 @@ NodeManager::DecrementGlobalRefCount(media_node_id nodeid, team_id team)
}
}
*count -= 1;
int32 debug_count = *count;
#if DEBUG >= 2
int32 debug_count = *count;
#endif
if (*count == 0) {
b = rn->teamrefcount.Remove(team);
ASSERT(b);
@ -469,7 +468,7 @@ NodeManager::GetLiveNodes(Stack<live_node_info> *livenodes, int32 maxcount, cons
registered_node *rn;
int namelen;
TRACE("NodeManager::GetLiveNodes: maxcount %d, in-format %p, out-format %p, name %s, require_kinds 0x%x\n",
TRACE("NodeManager::GetLiveNodes: maxcount %ld, in-format %p, out-format %p, name %s, require_kinds 0x%Lx\n",
maxcount, inputformat, outputformat, (name ? name : "NULL"), require_kinds);
// determine the count of byte to compare when checking for a name with(out) wildcard

View File

@ -27,9 +27,6 @@
*
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <OS.h>
#include <Locker.h>
#include <Autolock.h>

View File

@ -28,7 +28,7 @@
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#include <Application.h>
#include <stdio.h>
@ -576,7 +576,7 @@ ServerApp::controlthread(void *arg)
void ServerApp::MessageReceived(BMessage *msg)
{
TRACE("ServerApp::MessageReceived %x enter\n", msg->what);
TRACE("ServerApp::MessageReceived %lx enter\n", msg->what);
switch (msg->what) {
case MEDIA_SERVER_REQUEST_NOTIFICATIONS: gNotificationManager->EnqueueMessage(msg); break;
case MEDIA_SERVER_CANCEL_NOTIFICATIONS: gNotificationManager->EnqueueMessage(msg); break;
@ -585,7 +585,7 @@ void ServerApp::MessageReceived(BMessage *msg)
printf("\nnew media server: unknown message received\n");
msg->PrintToStream();
}
TRACE("ServerApp::MessageReceived %x leave\n", msg->what);
TRACE("ServerApp::MessageReceived %lx leave\n", msg->what);
}
int main()

View File

@ -28,7 +28,7 @@
*/
/* to comply with the license above, do not remove the following line */
static char __copyright[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002, 2003 Marcus Overhagen <Marcus@Overhagen.de>";
#define BUILDING_MEDIA_ADDON 1
#include <Application.h>