]> granicus.if.org Git - yasm/commitdiff
Fix a few LCLint errors.
authorPeter Johnson <peter@tortall.net>
Sun, 2 Dec 2001 22:39:06 +0000 (22:39 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 2 Dec 2001 22:39:06 +0000 (22:39 -0000)
svn path=/trunk/yasm/; revision=380

frontends/yasm/yasm.c
modules/parsers/nasm/bison.y.in
modules/parsers/nasm/nasm-bison.y
src/main.c
src/parsers/nasm/bison.y.in
src/parsers/nasm/nasm-bison.y

index a1e105ef43e0d789c8b7c4bfc7180aac83dd931b..53445b9296c5df4dcf6a3f026b9dcea99245342c 100644 (file)
@@ -90,7 +90,7 @@ static const char *help_tail =
     "\n";
 
 /* main function */
-/*@-globstate@*/
+/*@-globstate -unrecog@*/
 int
 main(int argc, char *argv[])
 {
@@ -150,7 +150,9 @@ main(int argc, char *argv[])
        exttail = strrchr(obj_filename, '.');
        if (!exttail)
            exttail = strrchr(obj_filename, '\0');
+       /*@-nullpass@*/
        sprintf(exttail, ".%s", cur_objfmt->extension);
+       /*@=nullpass@*/
 
        /* open the built filename */
        obj = fopen(obj_filename, "wb");
@@ -223,7 +225,7 @@ main(int argc, char *argv[])
     BitVector_Shutdown();
     return EXIT_SUCCESS;
 }
-/*@=globstate@*/
+/*@=globstate =unrecog@*/
 
 /*
  *  Command line options handlers
index 26eaeb9d66bf8d7796d1217e623a88f189e96756..d235ee0be007b6bce931db9d20d52569ddbdd2b5 100644 (file)
@@ -152,8 +152,8 @@ input: /* empty */
 line: '\n'             { $$ = (bytecode *)NULL; }
     | lineexp '\n'
     | LINE INTNUM '+' INTNUM FILENAME '\n' {
-       line_number = intnum_get_uint($2);
-       line_number_inc = intnum_get_uint($4);
+       line_number = (unsigned int)intnum_get_uint($2);
+       line_number_inc = (unsigned int)intnum_get_uint($4);
        line_number -= line_number_inc; /* as we'll add it back in */
        switch_filename($5);
        intnum_delete($2);
index 26eaeb9d66bf8d7796d1217e623a88f189e96756..d235ee0be007b6bce931db9d20d52569ddbdd2b5 100644 (file)
@@ -152,8 +152,8 @@ input: /* empty */
 line: '\n'             { $$ = (bytecode *)NULL; }
     | lineexp '\n'
     | LINE INTNUM '+' INTNUM FILENAME '\n' {
-       line_number = intnum_get_uint($2);
-       line_number_inc = intnum_get_uint($4);
+       line_number = (unsigned int)intnum_get_uint($2);
+       line_number_inc = (unsigned int)intnum_get_uint($4);
        line_number -= line_number_inc; /* as we'll add it back in */
        switch_filename($5);
        intnum_delete($2);
index a1e105ef43e0d789c8b7c4bfc7180aac83dd931b..53445b9296c5df4dcf6a3f026b9dcea99245342c 100644 (file)
@@ -90,7 +90,7 @@ static const char *help_tail =
     "\n";
 
 /* main function */
-/*@-globstate@*/
+/*@-globstate -unrecog@*/
 int
 main(int argc, char *argv[])
 {
@@ -150,7 +150,9 @@ main(int argc, char *argv[])
        exttail = strrchr(obj_filename, '.');
        if (!exttail)
            exttail = strrchr(obj_filename, '\0');
+       /*@-nullpass@*/
        sprintf(exttail, ".%s", cur_objfmt->extension);
+       /*@=nullpass@*/
 
        /* open the built filename */
        obj = fopen(obj_filename, "wb");
@@ -223,7 +225,7 @@ main(int argc, char *argv[])
     BitVector_Shutdown();
     return EXIT_SUCCESS;
 }
-/*@=globstate@*/
+/*@=globstate =unrecog@*/
 
 /*
  *  Command line options handlers
index 26eaeb9d66bf8d7796d1217e623a88f189e96756..d235ee0be007b6bce931db9d20d52569ddbdd2b5 100644 (file)
@@ -152,8 +152,8 @@ input: /* empty */
 line: '\n'             { $$ = (bytecode *)NULL; }
     | lineexp '\n'
     | LINE INTNUM '+' INTNUM FILENAME '\n' {
-       line_number = intnum_get_uint($2);
-       line_number_inc = intnum_get_uint($4);
+       line_number = (unsigned int)intnum_get_uint($2);
+       line_number_inc = (unsigned int)intnum_get_uint($4);
        line_number -= line_number_inc; /* as we'll add it back in */
        switch_filename($5);
        intnum_delete($2);
index 26eaeb9d66bf8d7796d1217e623a88f189e96756..d235ee0be007b6bce931db9d20d52569ddbdd2b5 100644 (file)
@@ -152,8 +152,8 @@ input: /* empty */
 line: '\n'             { $$ = (bytecode *)NULL; }
     | lineexp '\n'
     | LINE INTNUM '+' INTNUM FILENAME '\n' {
-       line_number = intnum_get_uint($2);
-       line_number_inc = intnum_get_uint($4);
+       line_number = (unsigned int)intnum_get_uint($2);
+       line_number_inc = (unsigned int)intnum_get_uint($4);
        line_number -= line_number_inc; /* as we'll add it back in */
        switch_filename($5);
        intnum_delete($2);