Commit 0b736a56 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

Fix compiler warnings related to win utf8 stuff.

parent d0c219f1
......@@ -25,6 +25,9 @@ int chmod_utf8(const char *filename, int pmode);
int utime_utf8(const char *filename, struct utimbuf *times);
int unlink_utf8(const char *filename);
int rename_utf8(const char *oldname, const char *newname);
size_t strlen_utf8(const char *str);
int win_get_console_width(void);
int print_console(FILE *stream, const wchar_t *text, uint32_t len);
#ifdef __cplusplus
} /* extern "C" */
......
......@@ -168,7 +168,7 @@ static int stats_char_count = 0;
static int console_width;
static int console_chars_left;
int get_console_width()
int get_console_width(void)
{
int width = 80;
#ifdef _WIN32
......@@ -199,12 +199,12 @@ size_t strlen_console(const char *text)
#endif
}
void stats_new_file()
void stats_new_file(void)
{
is_name_printed = false;
}
void stats_clear()
void stats_clear(void)
{
while (stats_char_count > 0 && stats_char_count--)
fprintf(stderr, "\b");
......
......@@ -53,10 +53,10 @@ size_t flac__utils_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stre
extern int flac__utils_verbosity_;
void flac__utils_printf(FILE *stream, int level, const char *format, ...);
int get_console_width();
int get_console_width(void);
size_t strlen_console(const char *text);
void stats_new_file();
void stats_clear();
void stats_new_file(void);
void stats_clear(void);
void stats_print_name(int level, const char *name);
void stats_print_info(int level, const char *format, ...);
......
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <sys/stat.h>
#include <sys/utime.h>
......@@ -8,7 +12,9 @@
#include <stdarg.h>
#include <windows.h> /* for WideCharToMultiByte and MultiByteToWideChar */
#include "share/compat.h"
#include "share/win_utf8_io.h"
#include "share/compat.h"
static UINT win_utf8_io_codepage = CP_ACP;
......@@ -101,7 +107,7 @@ size_t strlen_utf8(const char *str)
}
/* get the console width in characters */
int win_get_console_width()
int win_get_console_width(void)
{
int width = 80;
CONSOLE_SCREEN_BUFFER_INFO csbi;
......@@ -112,7 +118,7 @@ int win_get_console_width()
/* print functions */
int print_console(FILE *stream, const wchar_t *text, DWORD len)
int print_console(FILE *stream, const wchar_t *text, uint32_t len)
{
static HANDLE hOut;
static HANDLE hErr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment