]> granicus.if.org Git - python/commitdiff
Fix some warnings on HP-UX when using cc/aCC
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 10 Apr 2006 01:03:32 +0000 (01:03 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 10 Apr 2006 01:03:32 +0000 (01:03 +0000)
Modules/_ctypes/_ctypes.c
Modules/_testcapimodule.c
Modules/cPickle.c
Python/compile.c

index b9cac399c918cb5b8298497274142d389af6daa0..bcb179ee82e34fbbb162c14e08e424fa2ba18609 100644 (file)
@@ -904,7 +904,7 @@ ArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
        PyObject *typedict;
        int length;
 
-       int itemsize, itemalign, itemlen;
+       int itemsize, itemalign;
 
        typedict = PyTuple_GetItem(args, 2);
        if (!typedict)
@@ -941,7 +941,6 @@ ArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 
        itemsize = itemdict->size;
        itemalign = itemdict->align;
-       itemlen = itemdict->length;
 
        stgdict->size = itemsize * length;
        stgdict->align = itemalign;
index 60c71d7886b063d8e04afd53bb26badfbf478074..b1461bdc019f92bf162df2fd8a776dd86974c67b 100644 (file)
@@ -404,7 +404,7 @@ test_k_code(PyObject *self)
 
         PyTuple_SET_ITEM(tuple, 0, num);
 
-        value = -1;
+        value = 0;
         if (PyArg_ParseTuple(tuple, "k:test_k_code", &value) < 0)
                return NULL;
         if (value != ULONG_MAX)
@@ -423,7 +423,7 @@ test_k_code(PyObject *self)
 
         PyTuple_SET_ITEM(tuple, 0, num);
 
-       value = -1;
+       value = 0;
         if (PyArg_ParseTuple(tuple, "k:test_k_code", &value) < 0)
                return NULL;
         if (value != (unsigned long)-0x42)
index 727dcc946d76cd37d76ff04125b84e8ed916dbb1..69e15e2eb695383eb60e1dbe59f533a88ebf8b37 100644 (file)
@@ -123,7 +123,7 @@ static PyObject *__class___str, *__getinitargs___str, *__dict___str,
   *__getstate___str, *__setstate___str, *__name___str, *__reduce___str,
   *__reduce_ex___str,
   *write_str, *append_str,
-  *read_str, *readline_str, *__main___str, *__basicnew___str,
+  *read_str, *readline_str, *__main___str, 
   *copy_reg_str, *dispatch_table_str;
 
 /*************************************************************************
@@ -5602,7 +5602,6 @@ init_stuff(PyObject *module_dict)
        INIT_STR(readline);
        INIT_STR(copy_reg);
        INIT_STR(dispatch_table);
-       INIT_STR(__basicnew__);
 
        if (!( copy_reg = PyImport_ImportModule("copy_reg")))
                return -1;
index 3f73255729158bc0d79a616ce73cf0686ea0e22b..ae4c8503f008a951227bb219532852445f29a4d8 100644 (file)
@@ -4089,7 +4089,7 @@ assemble_lnotab(struct assembler *a, struct instr *i)
 {
        int d_bytecode, d_lineno;
        int len;
-       char *lnotab;
+       unsigned char *lnotab;
 
        d_bytecode = a->a_offset - a->a_lineno_off;
        d_lineno = i->i_lineno - a->a_lineno;
@@ -4112,7 +4112,8 @@ assemble_lnotab(struct assembler *a, struct instr *i)
                        if (_PyString_Resize(&a->a_lnotab, len) < 0)
                                return 0;
                }
-               lnotab = PyString_AS_STRING(a->a_lnotab) + a->a_lnotab_off;
+               lnotab = (unsigned char *)
+                          PyString_AS_STRING(a->a_lnotab) + a->a_lnotab_off;
                for (j = 0; j < ncodes; j++) {
                        *lnotab++ = 255;
                        *lnotab++ = 0;
@@ -4133,7 +4134,8 @@ assemble_lnotab(struct assembler *a, struct instr *i)
                        if (_PyString_Resize(&a->a_lnotab, len) < 0)
                                return 0;
                }
-               lnotab = PyString_AS_STRING(a->a_lnotab) + a->a_lnotab_off;
+               lnotab = (unsigned char *)
+                          PyString_AS_STRING(a->a_lnotab) + a->a_lnotab_off;
                *lnotab++ = 255;
                *lnotab++ = d_bytecode;
                d_bytecode = 0;
@@ -4150,7 +4152,8 @@ assemble_lnotab(struct assembler *a, struct instr *i)
                if (_PyString_Resize(&a->a_lnotab, len * 2) < 0)
                        return 0;
        }
-       lnotab = PyString_AS_STRING(a->a_lnotab) + a->a_lnotab_off;
+       lnotab = (unsigned char *)
+                       PyString_AS_STRING(a->a_lnotab) + a->a_lnotab_off;
 
        a->a_lnotab_off += 2;
        if (d_bytecode) {