Commit 40f83229 authored by Hanspeter Portner's avatar Hanspeter Portner

fix warning reported by scan-build.

parent 83320603
......@@ -186,7 +186,7 @@ static const char *note_keys [12] = {
static int
_lnote__index(lua_State *L)
{
moony_t *moony = lua_touserdata(L, lua_upvalueindex(1));
//moony_t *moony = lua_touserdata(L, lua_upvalueindex(1));
lua_settop(L, 2); // ignore superfluous arguments
......@@ -1425,7 +1425,8 @@ moony_in(moony_t *moony, const LV2_Atom_Sequence *control, LV2_Atom_Sequence *no
// initialize notify forge
const uint32_t capacity = notify->atom.size;
lv2_atom_forge_set_buffer(&moony->notify_forge, (uint8_t *)notify, capacity);
ref = lv2_atom_forge_sequence_head(&moony->notify_forge, &moony->notify_frame, 0);
if(ref)
ref = lv2_atom_forge_sequence_head(&moony->notify_forge, &moony->notify_frame, 0);
// read control sequence
LV2_ATOM_SEQUENCE_FOREACH(control, ev)
......
......@@ -982,7 +982,7 @@ _latom__tostring(lua_State *L)
static int
_latom__eq(lua_State *L)
{
moony_t *moony = lua_touserdata(L, lua_upvalueindex(1));
//moony_t *moony = lua_touserdata(L, lua_upvalueindex(1));
latom_t *latom1 = luaL_checkudata(L, 1, "latom");
latom_t *latom2 = luaL_checkudata(L, 2, "latom");
......
......@@ -171,7 +171,7 @@ _ltimeresponder_stash(lua_State *L)
static int
_ltimeresponder__index(lua_State *L)
{
moony_t *moony = lua_touserdata(L, lua_upvalueindex(1));
//moony_t *moony = lua_touserdata(L, lua_upvalueindex(1));
lua_settop(L, 2); // discard superfluous arguments
// 1: self
......
......@@ -107,7 +107,6 @@ static void *
lua_alloc(void *ud, void *ptr, size_t osize, size_t nsize)
{
moony_t *moony = ud;
moony_vm_t *vm = &moony->vm;
if(nsize == 0)
{
......
......@@ -1190,7 +1190,7 @@ _on_message_complete(http_parser *parser)
stat = http_status[STATUS_OK];
cont = http_content[CONTENT_TEXT_JSON];
chunk = strdup("Content-Length: 2\r\n\r\n{}");
size = strlen(chunk);
size = chunk ? strlen(chunk) : 0;
}
else if(strstr(client->url, "/lv2/dsp") == client->url)
{
......@@ -1199,7 +1199,7 @@ _on_message_complete(http_parser *parser)
stat = http_status[STATUS_OK];
cont = http_content[CONTENT_TEXT_JSON];
chunk = strdup("Content-Length: 2\r\n\r\n{}");
size = strlen(chunk);
size = chunk ? strlen(chunk) : 0;
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment