diff options
-rw-r--r-- | src/audio_out/audio_fusionsound_out.c | 2 | ||||
-rw-r--r-- | src/input/input_dvb.c | 2 | ||||
-rw-r--r-- | src/input/libreal/real.c | 2 | ||||
-rw-r--r-- | src/input/mms.c | 6 | ||||
-rw-r--r-- | src/input/mmsh.c | 4 | ||||
-rw-r--r-- | src/libsputext/demux_sputext.c | 3 | ||||
-rw-r--r-- | src/video_out/video_out_opengl.c | 4 | ||||
-rw-r--r-- | src/xine-engine/demux.c | 2 | ||||
-rw-r--r-- | src/xine-engine/info_helper.c | 4 | ||||
-rw-r--r-- | src/xine-engine/input_rip.c | 7 | ||||
-rw-r--r-- | src/xine-engine/xine_interface.c | 2 | ||||
-rw-r--r-- | src/xine-utils/list.c | 2 | ||||
-rw-r--r-- | src/xine-utils/utils.c | 2 | ||||
-rw-r--r-- | src/xine-utils/xmlparser.c | 3 |
14 files changed, 19 insertions, 26 deletions
diff --git a/src/audio_out/audio_fusionsound_out.c b/src/audio_out/audio_fusionsound_out.c index 1480cd6d2..6c3a0ae33 100644 --- a/src/audio_out/audio_fusionsound_out.c +++ b/src/audio_out/audio_fusionsound_out.c @@ -389,7 +389,7 @@ static ao_driver_t* open_plugin(audio_driver_class_t *ao_class, fusionsound_class_t *class = (fusionsound_class_t *) ao_class; fusionsound_driver_t *this; const char *args[] = { "xine", "--dfb:no-sighandler", "--fs:no-banner" }; - int argn = sizeof(args) / sizeof(args[0]); + const size_t argn = sizeof(args) / sizeof(args[0]); char **argp = (char **) args; DFBResult ret; diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 9166a80a6..69a413bac 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -1659,7 +1659,7 @@ static void render_text_area(osd_renderer_t* renderer, osd_object_t* osd, char* /* The line to be printed next. */ char text_line[512]; int text_width, text_height; - int old_line_length, line_cursor; + size_t old_line_length, line_cursor; char* bound, *old_bound; *height = 0; diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index dc3f00105..f4698a4fb 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -313,7 +313,7 @@ static void calc_response_string (char *result, char *challenge) { void real_calc_response_and_checksum (char *response, char *chksum, char *challenge) { - int ch_len, resp_len; + size_t ch_len, resp_len; int i; char *ptr; char buf[128]; diff --git a/src/input/mms.c b/src/input/mms.c index 97a05dd89..ab1983955 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -771,12 +771,10 @@ mms_t *mms_connect (xine_stream_t *stream, const char *url, int bandwidth) { /* command 0x5 */ { mms_buffer_t command_buffer; - char *path; - int pathlen; + char *path = this->uri; + size_t pathlen = strlen(path); /* remove the first '/' */ - path = this->uri; - pathlen = strlen(path); if (pathlen > 1) { path++; pathlen--; diff --git a/src/input/mmsh.c b/src/input/mmsh.c index 2feb7c37b..4ee7ed07d 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.c @@ -190,11 +190,9 @@ struct mmsh_s { }; static int send_command (mmsh_t *this, char *cmd) { - int length; - lprintf ("send_command:\n%s\n", cmd); - length = strlen(cmd); + const size_t length = strlen(cmd); if (_x_io_tcp_write(this->stream, this->s, cmd, length) != length) { xprintf (this->stream->xine, XINE_LOG_MSG, _("libmmsh: send error\n")); return 0; diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c index f7cd5af83..741d0612b 100644 --- a/src/libsputext/demux_sputext.c +++ b/src/libsputext/demux_sputext.c @@ -129,7 +129,6 @@ static int eol(char p) { } static inline void trail_space(char *s) { - int i; while (isspace(*s)) { char *copy = s; do { @@ -137,7 +136,7 @@ static inline void trail_space(char *s) { copy++; } while(*copy); } - i = strlen(s) - 1; + size_t i = strlen(s) - 1; while (i > 0 && isspace(s[i])) s[i--] = '\0'; } diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 9dcfd4f2e..af1093e91 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -669,8 +669,8 @@ static int render_image_envtex (opengl_driver_t *this, opengl_frame_t *frame) { * Render setup functions */ static int render_help_verify_ext (opengl_driver_t *this, char *ext) { - int ret = 0; - int l = strlen (ext); + int ret = 0; + const size_t l = strlen (ext); const char *e; for (e = (char *) this->gl_exts; e && *e; e = strchr (e, ' ')) { while (isspace (*e)) diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 51ed5b39d..c116d407f 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -657,7 +657,7 @@ void _x_demux_send_mrl_reference (xine_stream_t *stream, int alternative, xine_mrl_reference_data_ext_t *e; xine_mrl_reference_data_t *b; } data; - int mrl_len = strlen (mrl); + const size_t mrl_len = strlen (mrl); if (!title) title = ""; diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c index e6d4df7e9..242805915 100644 --- a/src/xine-engine/info_helper.c +++ b/src/xine-engine/info_helper.c @@ -131,7 +131,7 @@ uint32_t _x_stream_info_get_public(xine_stream_t *stream, int info) { * at the end of the string */ static void meta_info_chomp(char *str) { - int i, len; + size_t i, len; len = strlen(str); if (!len) @@ -358,7 +358,7 @@ void _x_meta_info_set_multi(xine_stream_t *stream, int info, ...) { va_list ap; char *args[1025]; char *buf; - int n, len; + size_t n, len; len = n = 0; diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index 200721dca..8db7eaaf5 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -517,10 +517,9 @@ static void rip_plugin_dispose(input_plugin_t *this_gen) { * returns non-zero, if there was enough space */ static int dir_file_concat(char *target, size_t maxlen, const char *dir, const char *name) { - size_t len_dir, len_name, pos_name = 0; - - len_name = strlen(name); - len_dir = strlen(dir); + size_t len_name = strlen(name); + size_t len_dir = strlen(dir); + size_t pos_name = 0; /* remove slashes */ if (dir[len_dir - 1] == '/') len_dir--; diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 597608883..415ceec56 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -945,7 +945,7 @@ int _x_message(xine_stream_t *stream, int type, ...) { xine_ui_message_data_t *data; xine_event_t event; const char *explanation; - int size; + size_t size; int n; va_list ap; char *s, *params; diff --git a/src/xine-utils/list.c b/src/xine-utils/list.c index 65bdaec26..b157bda3f 100644 --- a/src/xine-utils/list.c +++ b/src/xine-utils/list.c @@ -69,7 +69,7 @@ struct xine_list_s { */ static xine_list_chunk_t *xine_list_alloc_chunk(size_t size) { xine_list_chunk_t *new_chunk; - size_t chunk_mem_size;; + size_t chunk_mem_size; chunk_mem_size = sizeof(xine_list_chunk_t); chunk_mem_size += sizeof(xine_list_elem_t) * size; diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index 4085d65ee..9f5d122cb 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -525,7 +525,7 @@ void xine_hexdump (const char *buf, int length) { static const lang_locale_t *_get_first_lang_locale(const char *lcal) { const lang_locale_t *llocale; - int lang_len; + size_t lang_len; char *mod; if(lcal && *lcal) { diff --git a/src/xine-utils/xmlparser.c b/src/xine-utils/xmlparser.c index 426643708..2922135e2 100644 --- a/src/xine-utils/xmlparser.c +++ b/src/xine-utils/xmlparser.c @@ -597,11 +597,10 @@ static void xml_parser_dump_node (const xml_node_t *node, int indent) { xml_property_t *p; xml_node_t *n; - int l; printf ("%*s<%s ", indent, "", node->name); - l = strlen (node->name); + size_t l = strlen (node->name); p = node->props; while (p) { |