Skip to content

Commit

Permalink
Discarded dummy variables in cases where return values are ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Feb 25, 2012
1 parent 187c531 commit f396f8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions admin/Admin.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ void Admin_sendMessage(Dict* message, String* txid, struct Admin* admin)
memcpy(buff, "4567", 4); memcpy(buff, "4567", 4);
memcpy(buff + 4, txid->bytes, 4); memcpy(buff + 4, txid->bytes, 4);
} }
size_t ignore = write(admin->outFd, buff, written); write(admin->outFd, buff, written);
ignore = ignore;
} }


struct Admin* Admin_new(Dict* config, struct Admin* Admin_new(Dict* config,
Expand Down
5 changes: 2 additions & 3 deletions admin/http/HttpServer.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -208,10 +208,9 @@ static void apiHandler(struct evhttp_request* req, void* vcontext)
uint32_t txNum = context->txidBaseline + i; uint32_t txNum = context->txidBaseline + i;
memcpy(context->messageBuffer, "0123", 4); memcpy(context->messageBuffer, "0123", 4);
memcpy(context->messageBuffer + 4, &txNum, 4); memcpy(context->messageBuffer + 4, &txNum, 4);
size_t ignore = write(context->apiSocket, context->messageBuffer, 8 + strlen(content)); write(context->apiSocket, context->messageBuffer, 8 + strlen(content));
ignore = fwrite(context->messageBuffer, 8 + strlen(content), 1, stdout); fwrite(context->messageBuffer, 8 + strlen(content), 1, stdout);
printf("\n"); printf("\n");
ignore = ignore;
return; return;
} }
} }
Expand Down
3 changes: 1 addition & 2 deletions io/test/FileReader_test.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ int main()
FILE* tmp = tmpfile(); FILE* tmp = tmpfile();
uint8_t buffer1[2048]; uint8_t buffer1[2048];
randombytes(buffer1, 2048); randombytes(buffer1, 2048);
size_t iDoNotCare = fwrite(buffer1, 1, 2048, tmp); fwrite(buffer1, 1, 2048, tmp);
iDoNotCare = iDoNotCare;


struct Allocator* alloc = MallocAllocator_new(256); struct Allocator* alloc = MallocAllocator_new(256);


Expand Down

0 comments on commit f396f8b

Please sign in to comment.