]> granicus.if.org Git - yasm/commitdiff
Fix one line odd error: missing initialization of step.
authorMichael Urman <mu@tortall.net>
Wed, 9 Jan 2002 08:15:57 +0000 (08:15 -0000)
committerMichael Urman <mu@tortall.net>
Wed, 9 Jan 2002 08:15:57 +0000 (08:15 -0000)
svn path=/trunk/yasm/; revision=442

libyasm/linemgr.c
src/globals.c
src/linemgr.c

index 00d14ef112d001f6040df30a15a9e02d7c72bd65..d4f24479326077e9c97909e4f99586ddd4754518 100644 (file)
@@ -141,7 +141,7 @@ void
 line_lookup(unsigned long lindex, const char **filename, unsigned long *line)
 {
     line_index_mapping *mapping/*, *mapping2*/;
-    int vindex, step;
+    unsigned long vindex, step;
 
     assert(lindex <= line_index);
 
@@ -150,6 +150,7 @@ line_lookup(unsigned long lindex, const char **filename, unsigned long *line)
     mapping = line_index_map->vector;
     vindex = 0;
     /* start step as the greatest power of 2 <= size */
+    step = 1;
     while (step*2<=line_index_map->size) step*=2;
     while (step>0) {
        if (vindex+step < line_index_map->size
index 00d14ef112d001f6040df30a15a9e02d7c72bd65..d4f24479326077e9c97909e4f99586ddd4754518 100644 (file)
@@ -141,7 +141,7 @@ void
 line_lookup(unsigned long lindex, const char **filename, unsigned long *line)
 {
     line_index_mapping *mapping/*, *mapping2*/;
-    int vindex, step;
+    unsigned long vindex, step;
 
     assert(lindex <= line_index);
 
@@ -150,6 +150,7 @@ line_lookup(unsigned long lindex, const char **filename, unsigned long *line)
     mapping = line_index_map->vector;
     vindex = 0;
     /* start step as the greatest power of 2 <= size */
+    step = 1;
     while (step*2<=line_index_map->size) step*=2;
     while (step>0) {
        if (vindex+step < line_index_map->size
index 00d14ef112d001f6040df30a15a9e02d7c72bd65..d4f24479326077e9c97909e4f99586ddd4754518 100644 (file)
@@ -141,7 +141,7 @@ void
 line_lookup(unsigned long lindex, const char **filename, unsigned long *line)
 {
     line_index_mapping *mapping/*, *mapping2*/;
-    int vindex, step;
+    unsigned long vindex, step;
 
     assert(lindex <= line_index);
 
@@ -150,6 +150,7 @@ line_lookup(unsigned long lindex, const char **filename, unsigned long *line)
     mapping = line_index_map->vector;
     vindex = 0;
     /* start step as the greatest power of 2 <= size */
+    step = 1;
     while (step*2<=line_index_map->size) step*=2;
     while (step>0) {
        if (vindex+step < line_index_map->size