Fix some more snprintf related warnings.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25853 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-05-06 21:37:03 +00:00
parent 54548df56e
commit 77dfff5a55
5 changed files with 6 additions and 4 deletions

View File

@ -1079,7 +1079,7 @@ const char *get_token_value(struct gui_wps *gwps,
#endif /* HAVE_SPDIF_IN */
if (intval)
*intval = freq+1; /* so the token gets a value 1<=x<=7 */
snprintf(buf, buf_size, "%d\n",
snprintf(buf, buf_size, "%s\n",
freq_strings[global_settings.rec_frequency]);
#endif
return buf;

View File

@ -19,6 +19,7 @@
*
****************************************************************************/
#include <stdbool.h>
#include "action.h"
#include "font.h"
#ifdef HAVE_REMOTE_LCD

View File

@ -976,7 +976,7 @@ static const char* reclist_get_name(int selected_item, void * data,
#if CONFIG_CODEC == SWCODEC
#ifdef HAVE_SPDIF_REC
case ITEM_SAMPLERATE_D:
snprintf(buffer, buffer_len, "%s: %d",
snprintf(buffer, buffer_len, "%s: %lu",
str(LANG_RECORDING_FREQUENCY),
pcm_rec_sample_rate());
break;

View File

@ -287,7 +287,7 @@ void failsafe_menu(void)
printf("%s %s %s", arrow, options[i], def);
}
snprintf(buf, sizeof(buf), "Time left: %ds",
snprintf(buf, sizeof(buf), "Time left: %lds",
(TIMEOUT - (current_tick - start_tick)) / HZ);
lcd_puts(0, 10, buf);
lcd_update();

View File

@ -19,11 +19,12 @@
*
****************************************************************************/
#include <stdbool.h>
#include <stdio.h>
#include "config.h"
#include "cpu.h"
#include "system.h"
#include "string.h"
#include <stdbool.h>
#include "button.h"
#include "lcd.h"
#include "font.h"