tests/t0020-dirent.c


Log

Author Commit Date CI Message
Ramsay Jones 73dcf287 2010-01-12T16:39:25 msvc: Fix some "unreferenced formal parameter" warnings Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Ramsay Jones 1a7bae4d 2010-01-11T22:51:42 Fix some "unused parameter" warnings with -Wextra Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Ramsay Jones cfe3a027 2010-01-15T22:07:44 Use a 64 bit off_t throughout the library and tests on POSIX Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Julio Espinoza-Sokal 73c4dd92 2009-06-15T21:26:02 Add noreturn declaration compatible with the MSVC compiler. MSVC provides a compiler declaration to declare that a function never returns. This declaration is required in front of the function definition rather than at the end, but fortunately gcc is compatible with this location as well. Explicit returns are no longer required after calls to test_die. Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones c8d42b9b 2009-06-04T17:12:00 t0020-dirent.c: Add explicit returns to the callback functions In particular, the one_entry() and dont_call_me() callback functions require explicit returns, in order to suppress some "control path" compiler warnings (from MS Visual C/C++). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Ramsay Jones 498bc090 2009-03-23T18:47:18 t0020-dirent.c: allow test to be run standalone This test assumed that it was invoked in an empty directory, which is true when run from the Makefile, and so would fail if run standalone. In order to allow the test to work when run from any directory, create a sub directory "dir-walk" and chdir() into this directory while running the tests. Also, add some additional tests. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce 5690f02e 2008-12-31T15:35:36 Rewrite git_foreach_dirent into gitfo_dirent Our fileops API is currently private. We aren't planning on supplying a cross-platform file API to applications that link to us. If we did, we'd probably whole-sale publish fileops, not just the dirent code. By moving it to be private we can also change the call signature to permit the buffer to be passed down through the call chain. This is very helpful when we are doing a recursive scan as we can reuse just one buffer in all stack frames, reducing the impact the recursion has on the stack frames in the data cache. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>