summaryrefslogtreecommitdiff
path: root/libyasm
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2008-10-07 05:59:29 +0000
committerPeter Johnson <peter@tortall.net>2008-10-07 05:59:29 +0000
commit536542a69eea01f2a4208127c16a4238114e77e7 (patch)
treeaf2f5c469313db49b1b2684b431d407c04289e55 /libyasm
parentd810f45f7cb9f930780c46529b6d25fafec3e9d9 (diff)
downloadyasm-536542a69eea01f2a4208127c16a4238114e77e7.tar.gz
Fix a number of warnings.
svn path=/trunk/yasm/; revision=2133
Diffstat (limited to 'libyasm')
-rw-r--r--libyasm/bc-data.c2
-rw-r--r--libyasm/intnum.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/libyasm/bc-data.c b/libyasm/bc-data.c
index bdbf7b6b..3191958b 100644
--- a/libyasm/bc-data.c
+++ b/libyasm/bc-data.c
@@ -166,7 +166,7 @@ bc_data_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
bytecode_data *bc_data = (bytecode_data *)bc->contents;
yasm_dataval *dv;
yasm_intnum *intn;
- int len;
+ unsigned long len = 0;
unsigned long multiple;
/* Count up element sizes, rounding up string length. */
diff --git a/libyasm/intnum.c b/libyasm/intnum.c
index dab359ab..e39eb26f 100644
--- a/libyasm/intnum.c
+++ b/libyasm/intnum.c
@@ -261,6 +261,7 @@ yasm_intnum_create_charconst_tasm(const char *str)
{
yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
size_t len = strlen(str);
+ size_t i;
if(len*8 > BITVECT_NATIVE_SIZE)
yasm_error_set(YASM_ERROR_OVERFLOW,
@@ -276,7 +277,7 @@ yasm_intnum_create_charconst_tasm(const char *str)
}
/* tasm uses big endian notation */
- int i = 0;
+ i = 0;
switch (len) {
case 3:
intn->val.l |= ((unsigned long)str[i++]) & 0xff;