diff --git a/MRuby/mr-utils.c b/MRuby/mr-utils.c index de29d1254e..55fb66f741 100644 --- a/MRuby/mr-utils.c +++ b/MRuby/mr-utils.c @@ -149,11 +149,11 @@ static mrb_value MR_Time (mrb_state* mrb, mrb_value self) { static mrb_value MR_JsonParse (mrb_state* mrb, mrb_value self) { char* errmsg; char* s; - int res; + /* int res; */ size_t l; TRI_json_t* json; - res = mrb_get_args(mrb, "s", &s, &l); + /* res = */ mrb_get_args(mrb, "s", &s, &l); if (s == NULL) { return mrb_nil_value(); diff --git a/ShapedJson/shaped-json.c b/ShapedJson/shaped-json.c index 63c35219ed..d1102992e0 100644 --- a/ShapedJson/shaped-json.c +++ b/ShapedJson/shaped-json.c @@ -905,6 +905,8 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, TRI_shape_value_t* dst, T dst->_value = (ptr = TRI_Allocate(shaper->_memoryZone, dst->_size, true)); if (ptr == NULL) { + e = values + n; + for (p = values; p < e; ++p) { if (p->_value != NULL) { TRI_Free(shaper->_memoryZone, p->_value); diff --git a/V8/v8-conv.cpp b/V8/v8-conv.cpp index e198b0f7a7..3fab913c92 100644 --- a/V8/v8-conv.cpp +++ b/V8/v8-conv.cpp @@ -704,6 +704,8 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, dst->_value = (ptr = (char*) TRI_Allocate(shaper->_memoryZone, dst->_size, true)); if (ptr == NULL) { + e = values + n; + for (p = values; p < e; ++p) { if (p->_value != NULL) { TRI_Free(shaper->_memoryZone, p->_value); diff --git a/VocBase/simple-collection.c b/VocBase/simple-collection.c index 38fe3892d7..7742c2226f 100644 --- a/VocBase/simple-collection.c +++ b/VocBase/simple-collection.c @@ -504,7 +504,8 @@ static TRI_doc_mptr_t RollbackUpdate (TRI_sim_collection_t* sim, else { TRI_doc_mptr_t mptr; TRI_set_errno(TRI_ERROR_INTERNAL); - mptr._did = 0; + + memset(&mptr, 0, sizeof(mptr)); return mptr; }