diff options
author | hunt <hunt> | 2007-03-18 20:59:59 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-03-18 20:59:59 +0000 |
commit | c3e51a48f159e71048cea229bf277a9955c74ef3 (patch) | |
tree | 632ac21681f5afda26733aaa6d06b4af8acf77b3 /runtime | |
parent | 0c36452cc313a0966b7c9e2dfd69a1d0dbcaa00b (diff) | |
download | systemtap-steved-c3e51a48f159e71048cea229bf277a9955c74ef3.tar.gz systemtap-steved-c3e51a48f159e71048cea229bf277a9955c74ef3.tar.xz systemtap-steved-c3e51a48f159e71048cea229bf277a9955c74ef3.zip |
2007-03-18 Martin Hunt <hunt@redhat.com>
* stack.c, string.c, sym.c, transport/symbols.c:
Fix some signed vs unsigned comparison warnings.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/ChangeLog | 6 | ||||
-rw-r--r-- | runtime/stack.c | 2 | ||||
-rw-r--r-- | runtime/string.c | 2 | ||||
-rw-r--r-- | runtime/sym.c | 4 | ||||
-rw-r--r-- | runtime/transport/symbols.c | 11 |
5 files changed, 14 insertions, 11 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 5278a744..59e7bd97 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,4 +1,8 @@ -2007-03-14 Martin Hunt <hunt@redhat.com> +2007-03-18 Martin Hunt <hunt@redhat.com> + * stack.c, string.c, sym.c, transport/symbols.c: + Fix some signed vs unsigned comparison warnings. + +2007-03-14 Martin Hunt <hunt@redhat.com> * stpd: Remove directory. * relayfs: Remove directory. diff --git a/runtime/stack.c b/runtime/stack.c index 07315a90..51be05bd 100644 --- a/runtime/stack.c +++ b/runtime/stack.c @@ -102,7 +102,7 @@ void _stp_stack_snprint (char *str, int size, struct pt_regs *regs, int verbose, _stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id()); _stp_print_flush(); _stp_stack_print(regs, verbose, pi); - strlcpy(str, pb->buf, size < pb->len ? size : pb->len); + strlcpy(str, pb->buf, size < (int)pb->len ? size : (int)pb->len); pb->len = 0; } diff --git a/runtime/string.c b/runtime/string.c index 6bf89966..0cc169e7 100644 --- a/runtime/string.c +++ b/runtime/string.c @@ -41,7 +41,7 @@ int _stp_snprintf(char *buf, size_t size, const char *fmt, ...) int _stp_vscnprintf(char *buf, size_t size, const char *fmt, va_list args) { - int i = _stp_vsnprintf(buf,size,fmt,args); + unsigned i = _stp_vsnprintf(buf,size,fmt,args); return (i >= size) ? (size - 1) : i; } diff --git a/runtime/sym.c b/runtime/sym.c index 1e9de765..1a18f95b 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -25,7 +25,7 @@ static unsigned long _stp_module_relocate (const char *module, const char *secti static struct _stp_symbol *last_sec; unsigned long flags; int i,j; - + printk("_stp_relocate_module: %s, %s, %lx\n", module, section, offset); STP_LOCK_MODULES; if (! module || _stp_num_modules == 0) { STP_UNLOCK_MODULES; @@ -44,7 +44,7 @@ static unsigned long _stp_module_relocate (const char *module, const char *secti last = _stp_modules[i]; if (strcmp(module, last->name)) continue; - for (j = 0; j < last->num_sections; j++) { + for (j = 0; j < (int)last->num_sections; j++) { last_sec = &last->sections[j]; if (!strcmp (section, last_sec->symbol)) { STP_UNLOCK_MODULES; diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index abe60226..72070c7d 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -47,7 +47,7 @@ static int _stp_sym_type_ok(int type) /* we need to store all the parts we are interested in */ static unsigned _stp_get_sym_sizes(struct module *m, unsigned *dsize) { - int i; + unsigned int i; unsigned num = 0, datasize = 0; for (i=0; i < m->num_symtab; i++) { char *str = (char *)(m->strtab + m->symtab[i].st_name); @@ -163,8 +163,7 @@ static unsigned long _stp_kallsyms_lookup_name(const char *name); /* process the KERNEL symbols */ static int _stp_do_symbols(const char __user *buf, int count) { - unsigned datasize, num; - int i; + unsigned i, datasize, num; struct _stp_symbol *s; switch (_stp_symbol_state) { @@ -237,7 +236,7 @@ static void _stp_swap_symbol(void *x, void *y, int size) /* Create a new _stp_module and load the symbols */ static struct _stp_module *_stp_load_module_symbols (struct _stp_module *imod) { - int i, num=0; + unsigned i, num=0; struct module *m = (struct module *)imod->module; struct _stp_module *mod = NULL; char *dataptr; @@ -344,9 +343,9 @@ static void _stp_ins_module(struct _stp_module *mod) static int _stp_do_module(const char __user *buf, int count) { struct _stp_module tmpmod, *mod; - int i; + unsigned i; - if (count < sizeof(tmpmod)) { + if (count < (int)sizeof(tmpmod)) { errk("expected %d and got %d\n", (int)sizeof(tmpmod), count); return -EFAULT; } |