emuxki: enable Werror

Change-Id: I6ed7bfbe157bee86a8ce1dabc5829b8825e43f99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7609
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
PulkoMandy 2024-04-07 20:33:37 +02:00 committed by waddlesplash
parent af8ec5e1b4
commit d6e543c388
3 changed files with 20 additions and 11 deletions

View File

@ -674,10 +674,17 @@ rule ArchitectureSetupWarnings architecture
EnableWerror src add-ons kernel console ;
EnableWerror src add-ons kernel cpu ;
EnableWerror src add-ons kernel debugger ;
# EnableWerror src add-ons kernel drivers audio ac97 ;
EnableWerror src add-ons kernel drivers audio ac97 auich ;
# EnableWerror src add-ons kernel drivers audio ac97 auvia ;
# EnableWerror src add-ons kernel drivers audio ac97 es1370 ;
# EnableWerror src add-ons kernel drivers audio ac97 geode ;
# EnableWerror src add-ons kernel drivers audio ac97 ich ;
# EnableWerror src add-ons kernel drivers audio ac97 ichaudio ;
EnableWerror src add-ons kernel drivers audio ac97 sis7018 ;
# EnableWerror src add-ons kernel drivers audio cmedia ;
# EnableWerror src add-ons kernel drivers audio echo ;
# EnableWerror src add-ons kernel drivers audio emuxki ;
EnableWerror src add-ons kernel drivers audio echo ;
EnableWerror src add-ons kernel drivers audio emuxki ;
EnableWerror src add-ons kernel drivers audio generic ;
EnableWerror src add-ons kernel drivers audio hda ;
EnableWerror src add-ons kernel drivers audio ice1712 ;

View File

@ -252,7 +252,7 @@ emuxki_pmem_alloc(emuxki_dev *card, size_t size)
uint32 j, *ptb, silentpage;
ptb = card->ptb_log_base;
silentpage = ((uint32)card->silentpage_phy_base) << 1;
silentpage = ((uintptr_t)card->silentpage_phy_base) << 1;
numblocks = size / EMU_PTESIZE;
if (size % EMU_PTESIZE)
numblocks++;
@ -278,7 +278,7 @@ emuxki_pmem_alloc(emuxki_dev *card, size_t size)
PRINT(("emuxki_pmem_alloc : j == numblocks emuxki_mem_new ok\n"));
for (j = 0; j < numblocks; j++)
ptb[i + j] = B_HOST_TO_LENDIAN_INT32((uint32) (
(( ((uint32)mem->phy_base) +
(( ((uintptr_t)mem->phy_base) +
j * EMU_PTESIZE) << 1)
| (i + j)));
LIST_INSERT_HEAD(&(card->mem), mem, next);
@ -324,7 +324,7 @@ emuxki_mem_free(emuxki_dev *card, void *ptr)
uint32 i, *ptb, silentpage;
ptb = card->ptb_log_base;
silentpage = ((uint32)card->silentpage_phy_base) << 1;
silentpage = ((uintptr_t)card->silentpage_phy_base) << 1;
LOG(("emuxki_mem_free 1\n"));
LIST_FOREACH(mem, &card->mem, next) {
LOG(("emuxki_mem_free 2\n"));
@ -542,7 +542,7 @@ emuxki_channel_commit_parms(emuxki_channel *chan)
start = chan->loop.start +
(voice->stereo ? 28 : 30) * (voice->b16 + 1);
mapval = ((uint32)card->silentpage_phy_base) << 1 | EMU_CHAN_MAP_PTI_MASK;
mapval = ((uintptr_t)card->silentpage_phy_base) << 1 | EMU_CHAN_MAP_PTI_MASK;
//s = splaudio();
emuxki_chan_write(&card->config, chano, EMU_CHAN_CPF_STEREO, voice->stereo);
@ -1196,7 +1196,7 @@ emuxki_voice_commit_parms(emuxki_voice *voice)
default:
return B_ERROR;
}
emuxki_chan_write(&voice->stream->card->config, 0, buffaddr_reg, (uint32)voice->buffer->phy_base);
emuxki_chan_write(&voice->stream->card->config, 0, buffaddr_reg, (uintptr_t)voice->buffer->phy_base);
emuxki_chan_write(&voice->stream->card->config, 0, buffsize_reg, EMU_RECBS_BUFSIZE_NONE);
emuxki_chan_write(&voice->stream->card->config, 0, buffsize_reg, EMU_RECBS_BUFSIZE_4096);
@ -1810,6 +1810,7 @@ emuxki_gpr_get(emuxki_dev *card, emuxki_gpr *gpr, int32 type, float *values)
}
#if DEBUG > 0
void
emuxki_gpr_dump(emuxki_dev * card, uint16 count)
{
@ -1823,6 +1824,7 @@ emuxki_gpr_dump(emuxki_dev * card, uint16 count)
LOG(("dsp_gpr pc=%x, value=%x\n", pc, value));
}
}
#endif
static emuxki_gpr *
@ -2828,13 +2830,13 @@ emuxki_init(emuxki_dev * card)
* address by one and OR it with the page number. I don't know what
* the ORed index is for, might be a very useful unused feature...
*/
silentpage = ((uint32)card->silentpage_phy_base) << 1;
silentpage = ((uintptr_t)card->silentpage_phy_base) << 1;
ptb = card->ptb_log_base;
for (i = 0; i < EMU_MAXPTE; i++)
ptb[i] = B_HOST_TO_LENDIAN_INT32(silentpage | i);
/* Write PTB address and set TCB to none */
emuxki_chan_write(&card->config, 0, EMU_PTB, (uint32)card->ptb_phy_base);
emuxki_chan_write(&card->config, 0, EMU_PTB, (uintptr_t)card->ptb_phy_base);
emuxki_chan_write(&card->config, 0, EMU_TCBS, 0); /* This means 16K TCB */
emuxki_chan_write(&card->config, 0, EMU_TCB, 0); /* No TCB use for now */

View File

@ -200,7 +200,7 @@ emuxki_parameter_set_mix(void *card, const void *cookie, int32 type, float *valu
}
static int32
emuxki_create_group_control(multi_dev *multi, int32 *index, int32 parent,
emuxki_create_group_control(multi_dev *multi, uint32 *index, int32 parent,
int32 string, const char* name) {
int32 i = *index;
(*index)++;
@ -216,7 +216,7 @@ emuxki_create_group_control(multi_dev *multi, int32 *index, int32 parent,
}
static void
emuxki_create_gpr_control(multi_dev *multi, int32 *index, int32 parent, int32 string,
emuxki_create_gpr_control(multi_dev *multi, uint32 *index, int32 parent, int32 string,
const emuxki_gpr *gpr) {
int32 i = *index, id;
multi_mixer_control control;