mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-18 18:11:05 +00:00
Fix a few integer truncation warnings
This commit is contained in:
parent
7af62902b6
commit
7f816029ab
2 changed files with 4 additions and 5 deletions
|
@ -93,7 +93,7 @@ static int fluid_portaudio_get_device_name(int device_num, char **name_ptr)
|
|||
device_index:host_api_name:host_device_name.
|
||||
*/
|
||||
int i = device_num;
|
||||
int size = 0;
|
||||
size_t size = 0;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ static int fluid_portaudio_get_device_name(int device_num, char **name_ptr)
|
|||
while(i); /* index size */
|
||||
|
||||
/* host API size + host device size + 2 separators + zero termination */
|
||||
size += strlen(hostInfo->name) + strlen(deviceInfo->name) + 3;
|
||||
size += FLUID_STRLEN(hostInfo->name) + FLUID_STRLEN(deviceInfo->name) + 3u;
|
||||
*name_ptr = FLUID_MALLOC(size);
|
||||
|
||||
if(*name_ptr)
|
||||
|
|
|
@ -406,8 +406,7 @@ fluid_isasciistring(char *s)
|
|||
/* From ctype.h */
|
||||
#define fluid_isascii(c) (((c) & ~0x7f) == 0)
|
||||
|
||||
int i;
|
||||
int len = (int) FLUID_STRLEN(s);
|
||||
size_t i, len = FLUID_STRLEN(s);
|
||||
|
||||
for(i = 0; i < len; i++)
|
||||
{
|
||||
|
@ -1457,7 +1456,7 @@ delete_fluid_track(fluid_track_t *track)
|
|||
int
|
||||
fluid_track_set_name(fluid_track_t *track, char *name)
|
||||
{
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
if(track->name != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue