Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get rid of a couple compiler warnings.
[rsync/rsync.git]
/
wildtest.c
diff --git
a/wildtest.c
b/wildtest.c
index
52797d2
..
53a3933
100644
(file)
--- a/
wildtest.c
+++ b/
wildtest.c
@@
-5,7
+5,7
@@
#include "rsync.h"
#include "lib/wildmatch.h"
#include "rsync.h"
#include "lib/wildmatch.h"
-#define COMPARE_WITH_FNMATCH
+/*#define COMPARE_WITH_FNMATCH*/
#ifdef COMPARE_WITH_FNMATCH
#include <fnmatch.h>
#ifdef COMPARE_WITH_FNMATCH
#include <fnmatch.h>
@@
-24,6
+24,8
@@
beg(int n, const char *text, const char *pattern, bool matches, bool same_as_fnm
#ifdef COMPARE_WITH_FNMATCH
bool fn_matched;
int flags = strstr(pattern, "**")? 0 : FNM_PATHNAME;
#ifdef COMPARE_WITH_FNMATCH
bool fn_matched;
int flags = strstr(pattern, "**")? 0 : FNM_PATHNAME;
+#else
+ same_as_fnmatch = 0; /* Get rid of unused-variable compiler warning. */
#endif
matched = wildmatch(pattern, text);
#endif
matched = wildmatch(pattern, text);
@@
-50,6
+52,8
@@
end(int n, const char *text, const char *pattern, bool matches, bool same_as_fnm
#ifdef COMPARE_WITH_FNMATCH
bool fn_matched = false;
int flags = strstr(pattern, "**")? 0 : FNM_PATHNAME;
#ifdef COMPARE_WITH_FNMATCH
bool fn_matched = false;
int flags = strstr(pattern, "**")? 0 : FNM_PATHNAME;
+#else
+ same_as_fnmatch = 0; /* Get rid of unused-variable compiler warning. */
#endif
if (strncmp(pattern, "**", 2) == 0) {
#endif
if (strncmp(pattern, "**", 2) == 0) {