Minor cleanup before converting to ATF testcases
- Remove blank (tab-only) lines. - Fix -Wunused warnings. - Bump up to WARNS= 6
This commit is contained in:
parent
76cbe329d6
commit
b5d45f0794
@ -3,4 +3,6 @@
|
||||
PROG= lio_kqueue
|
||||
MAN=
|
||||
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -37,13 +37,15 @@
|
||||
* http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch
|
||||
*/
|
||||
|
||||
#include <aio.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/time.h>
|
||||
#include <aio.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX"
|
||||
@ -52,9 +54,10 @@
|
||||
#define MAX LIO_MAX * 16
|
||||
#define MAX_RUNS 300
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]){
|
||||
int fd;
|
||||
struct aiocb *iocb[MAX], *kq_iocb;
|
||||
struct aiocb *iocb[MAX];
|
||||
struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio;
|
||||
int i, result, run, error, j, k;
|
||||
char buffer[32768];
|
||||
@ -206,7 +209,7 @@ main(int argc, char *argv[]){
|
||||
printf("Return Resulto for %d %d is %d\n", j, k, result);
|
||||
#endif
|
||||
if (result != sizeof(buffer)) {
|
||||
printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %d\n",
|
||||
printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n",
|
||||
run, LIO_MAX - i -1, k, result, errno, sizeof(buffer));
|
||||
} else {
|
||||
printf("PASS: run %d, operation %d sub-opt %d result %d\n",
|
||||
|
Loading…
Reference in New Issue
Block a user