Fossil SCM

Fix compiler warning on builds that lack support for FuseFS.

drh 2022-02-08 17:14 trunk
Commit 398c5cd1a7fce2977ad515075976025bae1418deec3bd19499ff8f5b6064d380
1 file changed +3 -2
+3 -2
--- src/fusefs.c
+++ src/fusefs.c
@@ -20,14 +20,14 @@
2020
**
2121
** This module is a mostly a no-op unless compiled with -DFOSSIL_HAVE_FUSEFS.
2222
** The FOSSIL_HAVE_FUSEFS should be omitted on systems that lack support for
2323
** the Fuse Filesystem, of course.
2424
*/
25
-#ifdef FOSSIL_HAVE_FUSEFS
2625
#include "config.h"
2726
#include <stdio.h>
2827
#include <string.h>
28
+#ifdef FOSSIL_HAVE_FUSEFS
2929
#include <errno.h>
3030
#include <fcntl.h>
3131
#include <stdlib.h>
3232
#include <unistd.h>
3333
#include <sys/types.h>
@@ -338,11 +338,12 @@
338338
g.localOpen = 0; /* Prevent tags like "current" and "prev" */
339339
fuse_main(4, azNewArgv, &fusefs_methods, NULL);
340340
fusefs_reset();
341341
fusefs_clear_path();
342342
#else
343
- fossil_fatal("The FuseFS is not available in this build.");
343
+ fprintf(stderr, "The FuseFS is not available in this build.\n");
344
+ exit(1);
344345
#endif /* FOSSIL_HAVE_FUSEFS */
345346
}
346347
347348
/*
348349
** Return version numbers for the FUSE header that was used at compile-time
349350
--- src/fusefs.c
+++ src/fusefs.c
@@ -20,14 +20,14 @@
20 **
21 ** This module is a mostly a no-op unless compiled with -DFOSSIL_HAVE_FUSEFS.
22 ** The FOSSIL_HAVE_FUSEFS should be omitted on systems that lack support for
23 ** the Fuse Filesystem, of course.
24 */
25 #ifdef FOSSIL_HAVE_FUSEFS
26 #include "config.h"
27 #include <stdio.h>
28 #include <string.h>
 
29 #include <errno.h>
30 #include <fcntl.h>
31 #include <stdlib.h>
32 #include <unistd.h>
33 #include <sys/types.h>
@@ -338,11 +338,12 @@
338 g.localOpen = 0; /* Prevent tags like "current" and "prev" */
339 fuse_main(4, azNewArgv, &fusefs_methods, NULL);
340 fusefs_reset();
341 fusefs_clear_path();
342 #else
343 fossil_fatal("The FuseFS is not available in this build.");
 
344 #endif /* FOSSIL_HAVE_FUSEFS */
345 }
346
347 /*
348 ** Return version numbers for the FUSE header that was used at compile-time
349
--- src/fusefs.c
+++ src/fusefs.c
@@ -20,14 +20,14 @@
20 **
21 ** This module is a mostly a no-op unless compiled with -DFOSSIL_HAVE_FUSEFS.
22 ** The FOSSIL_HAVE_FUSEFS should be omitted on systems that lack support for
23 ** the Fuse Filesystem, of course.
24 */
 
25 #include "config.h"
26 #include <stdio.h>
27 #include <string.h>
28 #ifdef FOSSIL_HAVE_FUSEFS
29 #include <errno.h>
30 #include <fcntl.h>
31 #include <stdlib.h>
32 #include <unistd.h>
33 #include <sys/types.h>
@@ -338,11 +338,12 @@
338 g.localOpen = 0; /* Prevent tags like "current" and "prev" */
339 fuse_main(4, azNewArgv, &fusefs_methods, NULL);
340 fusefs_reset();
341 fusefs_clear_path();
342 #else
343 fprintf(stderr, "The FuseFS is not available in this build.\n");
344 exit(1);
345 #endif /* FOSSIL_HAVE_FUSEFS */
346 }
347
348 /*
349 ** Return version numbers for the FUSE header that was used at compile-time
350

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button