Fossil SCM

Fix a C99-style variable declaration.

drh 2013-12-13 00:11 UTC makefile-error
Commit a3641b544118fcf647aa334ccfd48fd769a77f6c
1 file changed +2 -1
+2 -1
--- src/file.c
+++ src/file.c
@@ -420,15 +420,16 @@
420420
/*
421421
** Set the mtime for a file.
422422
*/
423423
void file_set_mtime(const char *zFilename, i64 newMTime){
424424
#if !defined(_WIN32)
425
+ char *zMbcs;
425426
struct timeval tv[2];
426427
memset(tv, 0, sizeof(tv[0])*2);
427428
tv[0].tv_sec = newMTime;
428429
tv[1].tv_sec = newMTime;
429
- char *zMbcs = fossil_utf8_to_filename(zFilename);
430
+ zMbcs = fossil_utf8_to_filename(zFilename);
430431
utimes(zMbcs, tv);
431432
#else
432433
struct _utimbuf tb;
433434
wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
434435
tb.actime = newMTime;
435436
--- src/file.c
+++ src/file.c
@@ -420,15 +420,16 @@
420 /*
421 ** Set the mtime for a file.
422 */
423 void file_set_mtime(const char *zFilename, i64 newMTime){
424 #if !defined(_WIN32)
 
425 struct timeval tv[2];
426 memset(tv, 0, sizeof(tv[0])*2);
427 tv[0].tv_sec = newMTime;
428 tv[1].tv_sec = newMTime;
429 char *zMbcs = fossil_utf8_to_filename(zFilename);
430 utimes(zMbcs, tv);
431 #else
432 struct _utimbuf tb;
433 wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
434 tb.actime = newMTime;
435
--- src/file.c
+++ src/file.c
@@ -420,15 +420,16 @@
420 /*
421 ** Set the mtime for a file.
422 */
423 void file_set_mtime(const char *zFilename, i64 newMTime){
424 #if !defined(_WIN32)
425 char *zMbcs;
426 struct timeval tv[2];
427 memset(tv, 0, sizeof(tv[0])*2);
428 tv[0].tv_sec = newMTime;
429 tv[1].tv_sec = newMTime;
430 zMbcs = fossil_utf8_to_filename(zFilename);
431 utimes(zMbcs, tv);
432 #else
433 struct _utimbuf tb;
434 wchar_t *zMbcs = fossil_utf8_to_filename(zFilename);
435 tb.actime = newMTime;
436

Keyboard Shortcuts

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