comparison lwasm/pseudo.c @ 359:f318407d2469

Fix some signedness mismatches Use size_t instead of int for stuff that's going to be compared with the strlen() return value. While not technically wrong to use int, it does seem to attract warnings from some compilers. Technically, since it's also the return value from strtol(), there should be one variable that is long and another that is size_t but that's just getting crazy. Thanks to Erik G <erik@6809.org> for pointing these ones out.
author William Astle <lost@l-w.ca>
date Tue, 26 May 2015 17:49:26 -0600
parents b62af915c2cc
children 8764142b3192
comparison
equal deleted inserted replaced
358:fa3659ffa834 359:f318407d2469
16 16
17 You should have received a copy of the GNU General Public License along with 17 You should have received a copy of the GNU General Public License along with
18 this program. If not, see <http://www.gnu.org/licenses/>. 18 this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 */ 20 */
21
22 #include "lwasm.h"
21 23
22 #include <stdio.h> 24 #include <stdio.h>
23 #include <ctype.h> 25 #include <ctype.h>
24 #include <string.h> 26 #include <string.h>
25 #include <stdlib.h> 27 #include <stdlib.h>
26 #include <time.h> 28 #include <time.h>
27 29
28 #include <lw_alloc.h> 30 #include <lw_alloc.h>
29 31
30 #include "lwasm.h"
31 #include "instab.h" 32 #include "instab.h"
32 #include "input.h" 33 #include "input.h"
33 34
34 #include "lw_string.h" 35 #include "lw_string.h"
35 36
1768 int strcond_peq(char **p) 1769 int strcond_peq(char **p)
1769 { 1770 {
1770 char *arg0; 1771 char *arg0;
1771 char *arg1; 1772 char *arg1;
1772 char *arg2; 1773 char *arg2;
1773 int plen; 1774 size_t plen;
1774 int c = 0; 1775 int c = 0;
1775 1776
1776 arg0 = strcond_parsearg(p); 1777 arg0 = strcond_parsearg(p);
1777 arg1 = strcond_parsearg(p); 1778 arg1 = strcond_parsearg(p);
1778 arg2 = strcond_parsearg(p); 1779 arg2 = strcond_parsearg(p);
1794 int strcond_ipeq(char **p) 1795 int strcond_ipeq(char **p)
1795 { 1796 {
1796 char *arg0; 1797 char *arg0;
1797 char *arg1; 1798 char *arg1;
1798 char *arg2; 1799 char *arg2;
1799 int plen; 1800 size_t plen;
1800 int c = 0; 1801 int c = 0;
1801 1802
1802 arg0 = strcond_parsearg(p); 1803 arg0 = strcond_parsearg(p);
1803 arg1 = strcond_parsearg(p); 1804 arg1 = strcond_parsearg(p);
1804 arg2 = strcond_parsearg(p); 1805 arg2 = strcond_parsearg(p);
1820 int strcond_pne(char **p) 1821 int strcond_pne(char **p)
1821 { 1822 {
1822 char *arg0; 1823 char *arg0;
1823 char *arg1; 1824 char *arg1;
1824 char *arg2; 1825 char *arg2;
1825 int plen; 1826 size_t plen;
1826 int c = 0; 1827 int c = 0;
1827 1828
1828 arg0 = strcond_parsearg(p); 1829 arg0 = strcond_parsearg(p);
1829 arg1 = strcond_parsearg(p); 1830 arg1 = strcond_parsearg(p);
1830 arg2 = strcond_parsearg(p); 1831 arg2 = strcond_parsearg(p);
1846 int strcond_ipne(char **p) 1847 int strcond_ipne(char **p)
1847 { 1848 {
1848 char *arg0; 1849 char *arg0;
1849 char *arg1; 1850 char *arg1;
1850 char *arg2; 1851 char *arg2;
1851 int plen; 1852 size_t plen;
1852 int c = 0; 1853 int c = 0;
1853 1854
1854 arg0 = strcond_parsearg(p); 1855 arg0 = strcond_parsearg(p);
1855 arg1 = strcond_parsearg(p); 1856 arg1 = strcond_parsearg(p);
1856 arg2 = strcond_parsearg(p); 1857 arg2 = strcond_parsearg(p);
1875 char *arg1; 1876 char *arg1;
1876 char *arg2; 1877 char *arg2;
1877 char *rarg1; 1878 char *rarg1;
1878 char *rarg2; 1879 char *rarg2;
1879 1880
1880 int plen; 1881 size_t plen;
1881 int c = 0; 1882 int c = 0;
1882 1883
1883 arg0 = strcond_parsearg(p); 1884 arg0 = strcond_parsearg(p);
1884 arg1 = strcond_parsearg(p); 1885 arg1 = strcond_parsearg(p);
1885 arg2 = strcond_parsearg(p); 1886 arg2 = strcond_parsearg(p);
1910 char *arg1; 1911 char *arg1;
1911 char *arg2; 1912 char *arg2;
1912 char *rarg1; 1913 char *rarg1;
1913 char *rarg2; 1914 char *rarg2;
1914 1915
1915 int plen; 1916 size_t plen;
1916 int c = 0; 1917 int c = 0;
1917 1918
1918 arg0 = strcond_parsearg(p); 1919 arg0 = strcond_parsearg(p);
1919 arg1 = strcond_parsearg(p); 1920 arg1 = strcond_parsearg(p);
1920 arg2 = strcond_parsearg(p); 1921 arg2 = strcond_parsearg(p);
1947 char *arg1; 1948 char *arg1;
1948 char *arg2; 1949 char *arg2;
1949 char *rarg1; 1950 char *rarg1;
1950 char *rarg2; 1951 char *rarg2;
1951 1952
1952 int plen; 1953 size_t plen;
1953 int c = 0; 1954 int c = 0;
1954 1955
1955 arg0 = strcond_parsearg(p); 1956 arg0 = strcond_parsearg(p);
1956 arg1 = strcond_parsearg(p); 1957 arg1 = strcond_parsearg(p);
1957 arg2 = strcond_parsearg(p); 1958 arg2 = strcond_parsearg(p);
1983 char *arg1; 1984 char *arg1;
1984 char *arg2; 1985 char *arg2;
1985 char *rarg1; 1986 char *rarg1;
1986 char *rarg2; 1987 char *rarg2;
1987 1988
1988 int plen; 1989 size_t plen;
1989 int c = 0; 1990 int c = 0;
1990 1991
1991 arg0 = strcond_parsearg(p); 1992 arg0 = strcond_parsearg(p);
1992 arg1 = strcond_parsearg(p); 1993 arg1 = strcond_parsearg(p);
1993 arg2 = strcond_parsearg(p); 1994 arg2 = strcond_parsearg(p);