Skip to content

Commit

Permalink
open-osd: Assorted compiler warnings fixed
Browse files Browse the repository at this point in the history
gcc rightly complained about uninitialized variables. Fix that.

All these tests had undefined results, for sure, and never worked
before. (They might not work still but for other reasons)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
  • Loading branch information
Boaz Harrosh committed Apr 27, 2009
1 parent 34a9b27 commit cf1c989
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions osd-initiator/python/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ static PyObject *pyosd_command_set_cas(PyObject *self, PyObject *args)
int inlen, outlen;

if (!PyArg_ParseTuple(args, "KKs#s#|KK:set_cas", &pid, &oid,
inbuf, inlen, outbuf, outlen, &len, &offset))
&inbuf, &inlen, &outbuf, &outlen, &len, &offset))
return NULL;
if (py_command->set) {
PyErr_SetString(PyExc_RuntimeError, "command already set");
Expand Down Expand Up @@ -945,7 +945,7 @@ static PyObject *pyosd_command_set_fa(PyObject *self, PyObject *args)
int inlen, outlen;

if (!PyArg_ParseTuple(args, "KKs#s#|KK:set_fa", &pid, &oid,
inbuf, inlen, outbuf, outlen, &len, &offset))
&inbuf, &inlen, &outbuf, &outlen, &len, &offset))
return NULL;
if (py_command->set) {
PyErr_SetString(PyExc_RuntimeError, "command already set");
Expand Down
4 changes: 2 additions & 2 deletions osd-target/tests/osd-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static void test_osd_read_map(struct osd_device *osd)
{
int ret = 0;
uint8_t *sense = Calloc(1, 1024);
uint32_t cdb_cont_len;
uint32_t cdb_cont_len = 0;
void *wrbuf = Calloc(1, 256);
uint8_t *outdata = Calloc(1, 1024);
uint64_t used_outlen = 0;
Expand Down Expand Up @@ -708,7 +708,7 @@ static void test_osd_create_user_tracking_collection(struct osd_device *osd)
{
int ret = 0;
char buffer [50];
uint8_t list_attr;
uint8_t list_attr = 0;
uint64_t cid = 0;
uint64_t oid = 0;
uint64_t alloc_len;
Expand Down

0 comments on commit cf1c989

Please sign in to comment.