C Programming Question ...

Ben Duncan bns
Mon Mar 19 06:54:35 PDT 2007


Ok, working on a OLD project ...

Have this defined:

/* Next line is line line 519 */
static PyMethodDef apgn_methods[] = {
         {"close", PyCFunction)apgn_close, METH_VARARGS, /* LINE 520 */
          "close() \n Close the database."},
         {"keys",  PyCFunction)apgn_keys, METH_VARARGS, /* Line 522 */
          "keys() -> list \n Return a list of all keys in the database."},
         {"has_key", (PyCFunction)apgn_has_key,      METH_VARARGS,
          "has_key(key) -> boolean \n Return true iff key is in the database."},
         {"readrec", PyCFunction)apgn_read,         METH_VARARGS,
          "readrec(key, lock) \n"
          "Read an Appgen record - Does not return any DATA PORTION. \n"
          "IF lock is non-zero will attempt to lock that record \n"
          "But if unsucessfull will return lock status \n."},
         {"newrec",  (PyCFunction)apgn_newrec,       METH_VARARGS,
          "newrec(key) -> creates a new record \n"
          "Creates a new record space with key and locks that record."},
         {"writerec", (PyCFunction)apgn_writerec,     METH_VARARGS,
          "writerec(key) -> Writes back record \n"
          "This will write back the current record."},
         {"delrec",   (PyCFunction)apgn_delrec,       METH_VARARGS,
          "delrec(key) -> Deletes record \n"
          "IF the current record is locked, will delete record."},
         {"releaserec",  (PyCFunction)apgn_relrec,       METH_VARARGS,
          "releaserec() - release any LOCKS on databse youmightr have \n"},
         {"extract", (PyCFunction)apgn_extract,      METH_VARARGS,
          "extract(Attribute, Subval) -> Extract a Attribute \n"},
         {"replace", (PyCFunction)apgn_replace,      METH_VARARGS,
          "replace(String, Attribute, Subval) -> Replace a Attribute \n"},
         {"insert",  (PyCFunction)apgn_insert,       METH_VARARGS,
          "insert(String, Attribute, Subval) -> Insert a Attribute \n"},
         {NULL,          NULL}           /* sentinel */
};

Am getting these warnings ...
appgen.c:520: warning: initialization discards qualifiers from pointer target type
appgen.c:521: warning: initialization discards qualifiers from pointer target type
appgen.c:522: warning: initialization discards qualifiers from pointer target type
appgen.c:523: warning: initialization discards qualifiers from pointer target type
appgen.c:524: warning: initialization discards qualifiers from pointer target type
appgen.c:525: warning: initialization discards qualifiers from pointer target type
appgen.c:526: warning: initialization discards qualifiers from pointer target type
appgen.c:530: warning: initialization discards qualifiers from pointer target type
appgen.c:531: warning: initialization discards qualifiers from pointer target type
appgen.c:533: warning: initialization discards qualifiers from pointer target type
.............

and so on ....


What Is this saying to me ? Poor Programming practice? Can I fix this?
Ignore this ? What do I need to do ?

Thanks ...



-- 
Ben Duncan- Business Network Solutions, Inc. 336 Elton Road  Jackson MS, 39212 

"Never attribute to malice, that which can be adequately explained by stupidity"
        - Hanlon's Razor



More information about the Linux-users mailing list