Browse files

Discarded dummy variables in cases where return values are ignored.

  • Loading branch information...
1 parent 187c531 commit f396f8b9a816563f7436756a8f0677bb84b6ff4f @Ralith Ralith committed Feb 25, 2012
Showing with 4 additions and 7 deletions.
  1. +1 −2 admin/Admin.c
  2. +2 −3 admin/http/HttpServer.c
  3. +1 −2 io/test/FileReader_test.c
View
3 admin/Admin.c
@@ -402,8 +402,7 @@ void Admin_sendMessage(Dict* message, String* txid, struct Admin* admin)
memcpy(buff, "4567", 4);
memcpy(buff + 4, txid->bytes, 4);
}
- size_t ignore = write(admin->outFd, buff, written);
- ignore = ignore;
+ write(admin->outFd, buff, written);
}
struct Admin* Admin_new(Dict* config,
View
5 admin/http/HttpServer.c
@@ -208,10 +208,9 @@ static void apiHandler(struct evhttp_request* req, void* vcontext)
uint32_t txNum = context->txidBaseline + i;
memcpy(context->messageBuffer, "0123", 4);
memcpy(context->messageBuffer + 4, &txNum, 4);
- size_t ignore = write(context->apiSocket, context->messageBuffer, 8 + strlen(content));
- ignore = fwrite(context->messageBuffer, 8 + strlen(content), 1, stdout);
+ write(context->apiSocket, context->messageBuffer, 8 + strlen(content));
+ fwrite(context->messageBuffer, 8 + strlen(content), 1, stdout);
printf("\n");
- ignore = ignore;
return;
}
}
View
3 io/test/FileReader_test.c
@@ -27,8 +27,7 @@ int main()
FILE* tmp = tmpfile();
uint8_t buffer1[2048];
randombytes(buffer1, 2048);
- size_t iDoNotCare = fwrite(buffer1, 1, 2048, tmp);
- iDoNotCare = iDoNotCare;
+ fwrite(buffer1, 1, 2048, tmp);
struct Allocator* alloc = MallocAllocator_new(256);

0 comments on commit f396f8b

Please sign in to comment.