fix sign confusion

This commit is contained in:
Wim Taymans 2019-01-07 15:52:42 +01:00
parent 74e5f9fbcf
commit e918f9f77c
60 changed files with 164 additions and 146 deletions

View file

@ -125,7 +125,7 @@ int main(int argc, char *argv[])
pw_stream_connect(data.stream,
PW_DIRECTION_OUTPUT,
argc > 1 ? atoi(argv[1]) : SPA_ID_INVALID,
argc > 1 ? (uint32_t)atoi(argv[1]) : SPA_ID_INVALID,
PW_STREAM_FLAG_AUTOCONNECT |
PW_STREAM_FLAG_MAP_BUFFERS |
PW_STREAM_FLAG_RT_PROCESS,

View file

@ -70,7 +70,7 @@ struct data {
struct spa_audio_info_raw format;
struct buffer buffers[32];
int n_buffers;
uint32_t n_buffers;
struct spa_list empty;
double accumulator;
@ -334,7 +334,7 @@ static int impl_port_use_buffers(struct spa_node *node, enum spa_direction direc
struct spa_buffer **buffers, uint32_t n_buffers)
{
struct data *d = SPA_CONTAINER_OF(node, struct data, impl_node);
int i;
uint32_t i;
for (i = 0; i < n_buffers; i++) {
struct buffer *b = &d->buffers[i];
struct spa_data *datas = buffers[i]->datas;
@ -384,7 +384,8 @@ static void fill_f32(struct data *d, void *dest, int avail)
{
float *dst = dest;
int n_samples = avail / (sizeof(float) * d->format.channels);
int i, c;
int i;
uint32_t c;
for (i = 0; i < n_samples; i++) {
float val;
@ -404,7 +405,8 @@ static void fill_s16(struct data *d, void *dest, int avail)
{
int16_t *dst = dest;
int n_samples = avail / (sizeof(int16_t) * d->format.channels);
int i, c;
int i;
uint32_t c;
for (i = 0; i < n_samples; i++) {
int16_t val;

View file

@ -689,7 +689,7 @@ handle_port(struct impl *impl, uint32_t id, uint32_t parent_id, uint32_t type,
static void client_event_info(void *object, struct pw_client_info *info)
{
struct client *c = object;
int i;
uint32_t i;
pw_log_debug(NAME" %p: info for client %d", c->obj.impl, c->obj.id);
c->info = pw_client_info_update(c->info, info);

View file

@ -100,7 +100,7 @@ static Uint32 id_to_sdl_format(uint32_t id)
static struct spa_pod *sdl_build_formats(SDL_RendererInfo *info, struct spa_pod_builder *b)
{
int i, c;
uint32_t i, c;
spa_pod_builder_push_object(b, SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat);
spa_pod_builder_prop(b, SPA_FORMAT_mediaType, 0);

View file

@ -332,7 +332,7 @@ int main(int argc, char *argv[])
pw_stream_connect(data.stream,
PW_DIRECTION_INPUT,
data.path ? atoi(data.path) : SPA_ID_INVALID,
data.path ? (uint32_t)atoi(data.path) : SPA_ID_INVALID,
PW_STREAM_FLAG_AUTOCONNECT |
PW_STREAM_FLAG_INACTIVE |
PW_STREAM_FLAG_EXCLUSIVE |

View file

@ -86,7 +86,7 @@ static void on_timeout(void *userdata, uint64_t expirations)
struct data *data = userdata;
struct pw_buffer *b;
struct spa_buffer *buf;
int i, j;
uint32_t i, j;
uint8_t *p;
struct spa_meta *m;
struct spa_meta_header *h;