add missing static

This commit is contained in:
Christophe Fergeau 2011-04-22 11:48:53 +02:00
parent 12b9654bf4
commit e17767e892
8 changed files with 29 additions and 28 deletions

View File

@ -48,7 +48,7 @@ static void op_decode(SpiceJpegDecoder *decoder,
extern "C" {
void jpeg_decoder_init_source(j_decompress_ptr cinfo)
static void jpeg_decoder_init_source(j_decompress_ptr cinfo)
{
}

View File

@ -45,7 +45,7 @@ RedChannelBase::~RedChannelBase()
{
}
const char *spice_link_error_string(int err)
static const char *spice_link_error_string(int err)
{
switch (err) {
case SPICE_LINK_ERR_OK: return "no error";

View File

@ -56,8 +56,8 @@ static void FNAME(golomb_coding)(const BYTE n, const unsigned int l, unsigned in
}
}
unsigned int FNAME(golomb_decoding)(const unsigned int l, const unsigned int bits,
unsigned int * const codewordlen)
static unsigned int FNAME(golomb_decoding)(const unsigned int l, const unsigned int bits,
unsigned int * const codewordlen)
{
if (bits > VNAME(family).notGRprefixmask[l]) { /*GR*/
const unsigned int zeroprefix = cnt_l_zeroes(bits); /* leading zeroes in codeword */

View File

@ -74,16 +74,16 @@ size_t mjpeg_encoder_get_frame_stride(MJpegEncoder *encoder)
return encoder->stride;
}
void init_destination(j_compress_ptr cinfo)
static void init_destination(j_compress_ptr cinfo)
{
}
boolean empty_output_buffer(j_compress_ptr cinfo)
static boolean empty_output_buffer(j_compress_ptr cinfo)
{
return FALSE;
}
void term_destination(j_compress_ptr cinfo)
static void term_destination(j_compress_ptr cinfo)
{
}

View File

@ -201,7 +201,7 @@ static void red_peer_handle_outgoing(RedsStream *stream, OutgoingHandler *handle
}
}
void red_channel_on_output(void *opaque, int n)
static void red_channel_on_output(void *opaque, int n)
{
RedChannel *channel = opaque;
@ -401,11 +401,11 @@ error:
return NULL;
}
void do_nothing_disconnect(RedChannel *red_channel)
static void do_nothing_disconnect(RedChannel *red_channel)
{
}
int do_nothing_handle_message(RedChannel *red_channel, SpiceDataHeader *header, uint8_t *msg)
static int do_nothing_handle_message(RedChannel *red_channel, SpiceDataHeader *header, uint8_t *msg)
{
return TRUE;
}
@ -475,14 +475,14 @@ void red_channel_init_outgoing_messages_window(RedChannel *channel)
red_channel_push(channel);
}
void red_channel_handle_migrate_flush_mark(RedChannel *channel)
static void red_channel_handle_migrate_flush_mark(RedChannel *channel)
{
if (channel->handle_migrate_flush_mark) {
channel->handle_migrate_flush_mark(channel);
}
}
void red_channel_handle_migrate_data(RedChannel *channel, uint32_t size, void *message)
static void red_channel_handle_migrate_data(RedChannel *channel, uint32_t size, void *message)
{
if (!channel->handle_migrate_data) {
return;

View File

@ -388,8 +388,9 @@ static void qxl_worker_stop(QXLWorker *qxl_worker)
ASSERT(message == RED_WORKER_MESSAGE_READY);
}
void qxl_worker_loadvm_commands(QXLWorker *qxl_worker,
struct QXLCommandExt *ext, uint32_t count)
static void qxl_worker_loadvm_commands(QXLWorker *qxl_worker,
struct QXLCommandExt *ext,
uint32_t count)
{
RedDispatcher *dispatcher = (RedDispatcher *)qxl_worker;
RedWorkerMessage message = RED_WORKER_MESSAGE_LOADVM_COMMANDS;

View File

@ -1043,7 +1043,7 @@ static inline void validate_surface(RedWorker *worker, uint32_t surface_id)
PANIC_ON(!worker->surfaces[surface_id].context.canvas);
}
char *draw_type_to_str(uint8_t type)
static char *draw_type_to_str(uint8_t type)
{
switch (type) {
case QXL_DRAW_FILL:
@ -4131,7 +4131,7 @@ static CursorItem *get_cursor_item(RedWorker *worker, RedCursorCmd *cmd, uint32_
return cursor_item;
}
void qxl_process_cursor(RedWorker *worker, RedCursorCmd *cursor_cmd, uint32_t group_id)
static void qxl_process_cursor(RedWorker *worker, RedCursorCmd *cursor_cmd, uint32_t group_id)
{
CursorItem *item = get_cursor_item(worker, cursor_cmd, group_id);
int cursor_show = FALSE;
@ -8975,7 +8975,7 @@ static int display_channel_handle_message(RedChannel *channel, uint32_t size, ui
}
}
int common_channel_config_socket(RedChannel *channel)
static int common_channel_config_socket(RedChannel *channel)
{
int flags;
int delay_val;
@ -9005,16 +9005,16 @@ static void free_common_channel_from_listener(EventListener *ctx)
free(common);
}
void worker_watch_update_mask(SpiceWatch *watch, int event_mask)
static void worker_watch_update_mask(SpiceWatch *watch, int event_mask)
{
}
SpiceWatch *worker_watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque)
static SpiceWatch *worker_watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque)
{
return NULL; // apparently allowed?
}
void worker_watch_remove(SpiceWatch *watch)
static void worker_watch_remove(SpiceWatch *watch)
{
}

View File

@ -388,7 +388,7 @@ static void reds_link_free(RedLinkInfo *link)
#ifdef RED_STATISTICS
void insert_stat_node(StatNodeRef parent, StatNodeRef ref)
static void insert_stat_node(StatNodeRef parent, StatNodeRef ref)
{
SpiceStatNode *node = &reds->stat->nodes[ref];
uint32_t pos = INVALID_STAT_REF;
@ -457,7 +457,7 @@ StatNodeRef stat_add_node(StatNodeRef parent, const char *name, int visible)
return ref;
}
void stat_remove(SpiceStatNode *node)
static void stat_remove(SpiceStatNode *node)
{
pthread_mutex_lock(&reds->stat_lock);
node->flags &= ~SPICE_STAT_NODE_FLAG_ENABLED;
@ -583,7 +583,7 @@ static void reds_reset_vdp()
state->write_filter.discard_all = TRUE;
}
int reds_main_channel_connected()
static int reds_main_channel_connected(void)
{
return !!reds->main_channel;
}
@ -746,7 +746,7 @@ static void reds_push_tokens()
reds->agent_state.num_tokens = 0;
}
static int write_to_vdi_port();
static int write_to_vdi_port(void);
static void vdi_port_write_timer_start()
{
@ -805,7 +805,7 @@ static int write_to_vdi_port()
static int read_from_vdi_port(void);
void vdi_read_buf_release(uint8_t *data, void *opaque)
static void vdi_read_buf_release(uint8_t *data, void *opaque)
{
VDIReadBuf *buf = (VDIReadBuf *)opaque;
@ -1390,7 +1390,7 @@ static void reds_channel_set_common_caps(Channel *channel, int cap, int active)
}
}
void reds_channel_init_auth_caps(Channel *channel)
static void reds_channel_init_auth_caps(Channel *channel)
{
if (sasl_enabled) {
reds_channel_set_common_caps(channel, SPICE_COMMON_CAP_AUTH_SASL, TRUE);
@ -1721,7 +1721,7 @@ static int sync_write_u32(RedsStream *s, uint32_t n)
return sync_write(s, &n, sizeof(uint32_t));
}
ssize_t reds_stream_sasl_write(RedsStream *s, const void *buf, size_t nbyte)
static ssize_t reds_stream_sasl_write(RedsStream *s, const void *buf, size_t nbyte)
{
ssize_t ret;
@ -3100,7 +3100,7 @@ static void reds_mig_finished(int completed)
}
}
void reds_mig_switch(void)
static void reds_mig_switch(void)
{
main_channel_push_migrate_switch(reds->main_channel);
}