[darwinbuild-changes] [424] branches/PR-6392966
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 21 17:05:54 PST 2008
Revision: 424
http://trac.macosforge.org/projects/darwinbuild/changeset/424
Author: wsiegrist at apple.com
Date: 2008-11-21 17:05:53 -0800 (Fri, 21 Nov 2008)
Log Message:
-----------
Build with -Werror and fix a crash in darwinxref info subcommand
Modified Paths:
--------------
branches/PR-6392966/VERSION
branches/PR-6392966/darwinbuild/Makefile
branches/PR-6392966/darwinbuild/manifest.c
branches/PR-6392966/darwintrace/Makefile
branches/PR-6392966/darwinup/Depot.cpp
branches/PR-6392966/darwinup/Digest.cpp
branches/PR-6392966/darwinup/File.cpp
branches/PR-6392966/darwinup/Makefile
branches/PR-6392966/darwinup/main.cpp
branches/PR-6392966/darwinxref/DBDataStore.c
branches/PR-6392966/darwinxref/DBPlugin.c
branches/PR-6392966/darwinxref/DBPluginPriv.h
branches/PR-6392966/darwinxref/Makefile
branches/PR-6392966/darwinxref/cfutils.c
branches/PR-6392966/darwinxref/main.c
branches/PR-6392966/darwinxref/plugins/diff.c
branches/PR-6392966/darwinxref/plugins/dot.c
branches/PR-6392966/darwinxref/plugins/exportFiles.c
branches/PR-6392966/darwinxref/plugins/exportProject.c
branches/PR-6392966/darwinxref/plugins/findFile.c
branches/PR-6392966/darwinxref/plugins/loadDeps.c
branches/PR-6392966/darwinxref/plugins/loadFiles.c
branches/PR-6392966/darwinxref/plugins/loadIndex.c
branches/PR-6392966/darwinxref/plugins/register.c
branches/PR-6392966/darwinxref/plugins/resolveDeps.c
branches/PR-6392966/darwinxref/upgrade_plist.c
Added Paths:
-----------
branches/PR-6392966/darwinxref/DBDataStore.h
Modified: branches/PR-6392966/VERSION
===================================================================
--- branches/PR-6392966/VERSION 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/VERSION 2008-11-22 01:05:53 UTC (rev 424)
@@ -1 +1 @@
-0.7.2
+0.8.0
Modified: branches/PR-6392966/darwinbuild/Makefile
===================================================================
--- branches/PR-6392966/darwinbuild/Makefile 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinbuild/Makefile 2008-11-22 01:05:53 UTC (rev 424)
@@ -8,7 +8,7 @@
all: manifest
manifest: manifest.c
- cc -o $(OBJROOT)/$@ -lcrypto $^
+ cc -Wall -Werror -o $(OBJROOT)/$@ -lcrypto $^
install: all
[ -d $(BINDIR) ] || $(INSTALL) -d $(INSTALL_DIR_FLAGS) $(BINDIR)
Modified: branches/PR-6392966/darwinbuild/manifest.c
===================================================================
--- branches/PR-6392966/darwinbuild/manifest.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinbuild/manifest.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -56,8 +56,8 @@
m[4], m[5], m[6], m[7],
m[8], m[9], m[10], m[11],
m[12], m[13], m[14], m[15],
- m[16], m[17], m[18], m[19]
- );
+ m[16], m[17], m[18], m[19]
+ );
return result;
}
@@ -139,7 +139,6 @@
char filename[MAXPATHLEN+1];
char symlink[MAXPATHLEN+1];
int len;
- off_t size;
// Filename
filename[0] = 0;
@@ -182,4 +181,6 @@
free(checksum);
}
fts_close(fts);
-}
\ No newline at end of file
+
+ return 0;
+}
Modified: branches/PR-6392966/darwintrace/Makefile
===================================================================
--- branches/PR-6392966/darwintrace/Makefile 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwintrace/Makefile 2008-11-22 01:05:53 UTC (rev 424)
@@ -21,7 +21,7 @@
darwintrace.dylib: darwintrace.c
cc -o $(OBJROOT)/$@ \
$(ARCHS) \
- -W -Wall -pedantic -std=c99 \
+ -Wall -Werror -pedantic -std=c99 \
-flat_namespace \
-fno-common \
$(CFLAGS) \
Modified: branches/PR-6392966/darwinup/Depot.cpp
===================================================================
--- branches/PR-6392966/darwinup/Depot.cpp 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinup/Depot.cpp 2008-11-22 01:05:53 UTC (rev 424)
@@ -230,7 +230,7 @@
if (blobsize > 0) {
digest = new Digest();
digest->m_size = blobsize;
- memcpy(digest->m_data, blob, (blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
+ memcpy(digest->m_data, blob, ((size_t)blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
}
File* file = FileFactory(serial, archive, info, (const char*)path, mode, uid, gid, size, digest);
@@ -676,7 +676,7 @@
if (res == 0) res = this->iterate_files(archive, &Depot::uninstall_file, &context);
if (res == 0) res = this->begin_transaction();
- int i;
+ uint32_t i;
for (i = 0; i < context.files_to_remove->count; ++i) {
uint64_t serial = context.files_to_remove->values[i];
IF_DEBUG("deleting file %lld\n", serial);
@@ -819,7 +819,7 @@
if (blobsize > 0) {
digest = new Digest();
digest->m_size = blobsize;
- memcpy(digest->m_data, blob, (blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
+ memcpy(digest->m_data, blob, ((size_t)blobsize < sizeof(digest->m_data)) ? blobsize : sizeof(digest->m_data));
}
Archive* archive = this->archive(archive_serial);
Modified: branches/PR-6392966/darwinup/Digest.cpp
===================================================================
--- branches/PR-6392966/darwinup/Digest.cpp 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinup/Digest.cpp 2008-11-22 01:05:53 UTC (rev 424)
@@ -90,7 +90,7 @@
char* Digest::string() {
static const char* hexabet = "0123456789abcdef";
char* result = (char*)malloc(2*m_size+1);
- int i, j;
+ uint32_t i, j;
for (i = 0, j = 0; i < m_size; ++i) {
result[j++] = hexabet[(m_data[i] & 0xF0) >> 4];
@@ -105,7 +105,7 @@
if (a == b) return 1;
if (a == NULL) return 0;
if (b == NULL) return 0;
- int a_size = a->size();
+ uint32_t a_size = a->size();
if (a_size != b->size()) {
return 0;
}
@@ -153,7 +153,6 @@
SHA1DigestMachO::SHA1DigestMachO(const char* filename) {
- char* res = NULL;
char* error = NULL;
// Check for Mach-O
Modified: branches/PR-6392966/darwinup/File.cpp
===================================================================
--- branches/PR-6392966/darwinup/File.cpp 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinup/File.cpp 2008-11-22 01:05:53 UTC (rev 424)
@@ -142,7 +142,7 @@
const char* dstpath = this->path();
if (dirpath) {
ssize_t len = snprintf(srcpath, sizeof(srcpath), "%s/%s", dirpath, dstpath);
- if (len > sizeof(srcpath)) {
+ if ((size_t)len > sizeof(srcpath)) {
fprintf(stderr, "ERROR: [install] path too long: %s/%s\n", dirpath, dstpath);
return -1;
}
@@ -257,7 +257,7 @@
int Symlink::install_info() {
int res = 0;
const char* path = this->path();
- mode_t mode = this->mode() & ALLPERMS;
+ //mode_t mode = this->mode() & ALLPERMS;
uid_t uid = this->uid();
gid_t gid = this->gid();
IF_DEBUG("[install] lchown(%d, %d)\n", uid, gid);
@@ -348,7 +348,7 @@
break;
case FTS_DEFAULT:
case FTS_DNR:
- fprintf(stderr, "%s:%d: could not read directory. Run as root.\n", __FILE__, __LINE__, ent->fts_info);
+ fprintf(stderr, "%s:%d: could not read directory. Run as root.\n", __FILE__, __LINE__);
break;
default:
fprintf(stderr, "%s:%d: unexpected fts_info type %d\n", __FILE__, __LINE__, ent->fts_info);
Modified: branches/PR-6392966/darwinup/Makefile
===================================================================
--- branches/PR-6392966/darwinup/Makefile 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinup/Makefile 2008-11-22 01:05:53 UTC (rev 424)
@@ -1,6 +1,6 @@
include ../common.mk
-CXXFLAGS=-g
+CXXFLAGS=-g -Wall -Werror
# libredo.o is generated from cctools_ofiles
REDO=$(shell if [ -f /usr/local/lib/libredo_prebinding.a ]; then \
echo /usr/local/lib/libredo_prebinding.a ; else \
Modified: branches/PR-6392966/darwinup/main.cpp
===================================================================
--- branches/PR-6392966/darwinup/main.cpp 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinup/main.cpp 2008-11-22 01:05:53 UTC (rev 424)
@@ -33,14 +33,14 @@
void usage(char* progname) {
char* pad = strdup(progname);
- int i;
+ size_t i;
for (i = 0; i < strlen(pad); ++i) pad[i] = ' ';
fprintf(stderr, "usage: %s install <path>\n", progname);
- fprintf(stderr, " %s list\n", pad, progname);
- fprintf(stderr, " %s files <uuid>\n", pad, progname);
- fprintf(stderr, " %s uninstall <uuid>\n", pad, progname);
- fprintf(stderr, " %s verify <uuid>\n", pad, progname);
+ fprintf(stderr, " %s list\n", pad);
+ fprintf(stderr, " %s files <uuid>\n", pad);
+ fprintf(stderr, " %s uninstall <uuid>\n", pad);
+ fprintf(stderr, " %s verify <uuid>\n", pad);
exit(1);
}
Modified: branches/PR-6392966/darwinxref/DBDataStore.c
===================================================================
--- branches/PR-6392966/darwinxref/DBDataStore.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/DBDataStore.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -124,7 +124,6 @@
CFDataRef data = NULL;
sqlite3_stmt* stmt = NULL;
va_list args;
- char* errmsg;
va_start(args, fmt);
sqlite3* db = _DBPluginGetDataStorePtr();
if (db) {
@@ -802,7 +801,6 @@
CFStringRef prop = CFArrayGetValueAtIndex(existingProps, i);
if (!CFArrayContainsValue(props, range, prop)) {
char* cbuild = strdup_cfstr(build);
- char* cproj = strdup_cfstr(project);
char* cprop = strdup_cfstr(prop);
if (project) {
char* cproj = strdup_cfstr(project);
Added: branches/PR-6392966/darwinxref/DBDataStore.h
===================================================================
--- branches/PR-6392966/darwinxref/DBDataStore.h (rev 0)
+++ branches/PR-6392966/darwinxref/DBDataStore.h 2008-11-22 01:05:53 UTC (rev 424)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_BSD_LICENSE_HEADER_START@
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @APPLE_BSD_LICENSE_HEADER_END@
+ */
+
+#ifndef __DARWINBUILD_DATASTORE_H__
+#define __DARWINBUILD_DATASTORE_H__
+
+#include "sqlite3.h"
+
+int SQL(const char* fmt, ...);
+int SQL_BOOLEAN(const char* fmt, ...);
+int SQL_CALLBACK(sqlite3_callback callback, void* context, const char* fmt, ...);
+void SQL_NOERR(char* sql);
+char* SQL_STRING(const char* fmt, ...);
+
+void* _DBPluginGetDataStorePtr();
+
+#endif
Modified: branches/PR-6392966/darwinxref/DBPlugin.c
===================================================================
--- branches/PR-6392966/darwinxref/DBPlugin.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/DBPlugin.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -118,6 +118,13 @@
return plugin;
}
+//////
+//
+// DBPluginLoadPlugins
+// returns -1 if the plugin dictionary cannot be
+// created, otherwise returns 0
+//
+/////
int DBPluginLoadPlugins(const char* plugin_path) {
if (plugins == NULL) {
plugins = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &cfDictionaryPluginValueCallBacks);
@@ -188,6 +195,8 @@
free(path_argv[i]);
}
free(path_argv);
+
+ return 0;
}
void print_usage(char* progname, int argc, char* argv[]) {
@@ -308,4 +317,5 @@
if (plugin->type == kDBPluginProjectPropertyType) return CFRetain(CFSTR("<project>"));
if (plugin->type == kDBPluginBuildPropertyType) return CFRetain(CFSTR(""));
if (plugin->type == kDBPluginPropertyType) return CFRetain(CFSTR("[<project>]"));
+ return CFRetain(CFSTR("<unknown property type>"));
}
Modified: branches/PR-6392966/darwinxref/DBPluginPriv.h
===================================================================
--- branches/PR-6392966/darwinxref/DBPluginPriv.h 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/DBPluginPriv.h 2008-11-22 01:05:53 UTC (rev 424)
@@ -86,3 +86,6 @@
int run_plugin(int argc, char* argv[]);
int DBDataStoreInitialize(const char* datafile);
void DBSetCurrentBuild(char* build);
+
+void print_usage(char* progname, int argc, char* argv[]);
+
Modified: branches/PR-6392966/darwinxref/Makefile
===================================================================
--- branches/PR-6392966/darwinxref/Makefile 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/Makefile 2008-11-22 01:05:53 UTC (rev 424)
@@ -25,7 +25,7 @@
TCL_CFLAGS=-DHAVE_TCL_PLUGINS=1
TCL_LDFLAGS=-ltcl
-CFLAGS+=-g $(TCL_CFLAGS) -DVERSION=\"$(shell cat ../VERSION)\" $(SQLITEINC)
+CFLAGS+=-g -Wall -Werror $(TCL_CFLAGS) -DVERSION=\""$(shell cat ../VERSION)"\" $(SQLITEINC)
LDFLAGS+=-framework CoreFoundation $(TCL_LDFLAGS)
PLUGIN_CFLAGS=$(CFLAGS) -I.
PLUGIN_LDFLAGS=$(LDFLAGS) -bundle -bundle_loader $(SYMROOT)/darwinxref
Modified: branches/PR-6392966/darwinxref/cfutils.c
===================================================================
--- branches/PR-6392966/darwinxref/cfutils.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/cfutils.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -292,7 +292,7 @@
const char* str = (const char*)value;
unsigned long hash = 5381;
int c;
- while (c = *str++) hash = ((hash << 5) + hash) + c; // hash*33 + c
+ while ((c = *str++)) hash = ((hash << 5) + hash) + c; // hash*33 + c
return hash;
}
CFDictionaryKeyCallBacks cfDictionaryCStringKeyCallBacks = {
Modified: branches/PR-6392966/darwinxref/main.c
===================================================================
--- branches/PR-6392966/darwinxref/main.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/main.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -37,6 +37,7 @@
#include <fcntl.h>
#include <dlfcn.h>
#include <getopt.h>
+#include <libgen.h>
#include "DBPluginPriv.h"
@@ -81,13 +82,16 @@
printf("%s/%s\n", basename(progname), "" VERSION "");
printf("\tcurrent build: %s\n", build);
printf("\tsqlite/%s (%s)\n", sqlite3_version, "UTF-8");
- printf("\tCoreFoundation/%g%s\n", kCFCoreFoundationVersionNumber, NSIsSymbolNameDefined("_CFNotificationCenterGetTypeID") ? "" : " (CF-Lite)");
+ printf("\tCoreFoundation/%g %s\n", kCFCoreFoundationVersionNumber,
+ dlsym(RTLD_DEFAULT, "CFNotificationCenterGetTypeID") ? "" : "(CF-Lite)");
exit(1);
}
DBDataStoreInitialize(dbfile);
DBSetCurrentBuild(build);
- DBPluginLoadPlugins(plugins);
+ if (DBPluginLoadPlugins(plugins) == -1) {
+ fprintf(stderr, "Error: cannot allocate memory for plugins!\n");
+ }
if (run_plugin(argc, argv) == -1) {
print_usage(progname, argc, argv);
exit(1);
Modified: branches/PR-6392966/darwinxref/plugins/diff.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/diff.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/diff.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -53,7 +53,7 @@
* Diff two project files
*/
int run(CFArrayRef argv) {
- int res = 0;
+
// ensure we have two and only two arguments
CFIndex count = CFArrayGetCount(argv);
if (count != 2) return -1;
Modified: branches/PR-6392966/darwinxref/plugins/dot.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/dot.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/dot.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -63,6 +63,7 @@
CFRelease(builds);
+ return 0;
}
static CFStringRef usage() {
Modified: branches/PR-6392966/darwinxref/plugins/exportFiles.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/exportFiles.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/exportFiles.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <stdio.h>
#include <regex.h>
Modified: branches/PR-6392966/darwinxref/plugins/exportProject.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/exportProject.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/exportProject.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -42,7 +42,6 @@
int xml = 0, i;
CFMutableDictionaryRef dict, preplist;
CFDictionaryRef project;
- char *cproj;
CFStringRef projname;
CFArrayRef builds;
const void *ssites, *bsites;
Modified: branches/PR-6392966/darwinxref/plugins/findFile.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/findFile.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/findFile.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <stdio.h>
#include <regex.h>
@@ -76,12 +77,11 @@
}
static int findFile(char* file, char* build) {
- char* errmsg;
char project[BUFSIZ];
project[0] = 0;
asprintf(&file, "%%%s", file);
- int res = SQL_CALLBACK(&printFiles, project,
- "SELECT project,path FROM files WHERE build=%Q AND path LIKE %Q ORDER BY project, path",
- build, file);
+ SQL_CALLBACK(&printFiles, project,
+ "SELECT project,path FROM files WHERE build=%Q AND path LIKE %Q ORDER BY project, path",
+ build, file);
return 0;
}
Modified: branches/PR-6392966/darwinxref/plugins/loadDeps.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/loadDeps.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/loadDeps.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/param.h>
@@ -132,4 +133,6 @@
if (SQL("COMMIT")) { return -1; }
fprintf(stderr, "loaded %d unresolved dependencies.\n", count);
+
+ return 0;
}
Modified: branches/PR-6392966/darwinxref/plugins/loadFiles.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/loadFiles.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/loadFiles.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <stdio.h>
#include <regex.h>
@@ -39,7 +40,6 @@
static int run(CFArrayRef argv) {
int res = 0;
- CFStringRef project = NULL;
CFIndex count = CFArrayGetCount(argv);
if (count != 1) return -1;
char* filename = strdup_cfstr(CFArrayGetValueAtIndex(argv, 0));
@@ -76,8 +76,6 @@
FILE* fp = fopen(path, "r");
int loaded = 0, total = 0;
if (fp) {
- char* errmsg;
-
//
// Create the projects table if it does not already exist
//
Modified: branches/PR-6392966/darwinxref/plugins/loadIndex.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/loadIndex.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/loadIndex.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -35,7 +35,6 @@
static int run(CFArrayRef argv) {
int res = 0;
- CFStringRef project = NULL;
CFIndex count = CFArrayGetCount(argv);
if (count != 1) return -1;
char* filename = strdup_cfstr(CFArrayGetValueAtIndex(argv, 0));
Modified: branches/PR-6392966/darwinxref/plugins/register.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/register.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/register.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/syslimits.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -679,10 +680,11 @@
SQL("DELETE FROM mach_o_objects WHERE build=%Q AND project=%Q", build, project);
SQL("DELETE FROM mach_o_symbols WHERE mach_o_object NOT IN (SELECT serial FROM mach_o_objects)");
+
+ return 0;
}
int register_files(char* build, char* project, char* path) {
- char* errmsg;
int res;
int loaded = 0;
@@ -708,7 +710,6 @@
char filename[MAXPATHLEN+1];
char symlink[MAXPATHLEN+1];
int len;
- off_t size;
// Filename
filename[0] = 0;
@@ -774,7 +775,6 @@
}
int register_files_from_stdin(char* build, char* project, char* path) {
- char* errmsg;
int res;
int loaded = 0;
char *line;
Modified: branches/PR-6392966/darwinxref/plugins/resolveDeps.c
===================================================================
--- branches/PR-6392966/darwinxref/plugins/resolveDeps.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/plugins/resolveDeps.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -31,6 +31,7 @@
*/
#include "DBPlugin.h"
+#include "DBDataStore.h"
#include <sys/stat.h>
#include <sys/types.h>
@@ -172,6 +173,8 @@
}
if (SQL("COMMIT")) { return -1; }
+
+ return 0;
}
int resolve_dependencies(const char* build, const char* project, int commit) {
@@ -201,4 +204,6 @@
CFRelease(builds);
CFRelease(projects);
+
+ return 0;
}
Modified: branches/PR-6392966/darwinxref/upgrade_plist.c
===================================================================
--- branches/PR-6392966/darwinxref/upgrade_plist.c 2008-11-21 21:50:28 UTC (rev 423)
+++ branches/PR-6392966/darwinxref/upgrade_plist.c 2008-11-22 01:05:53 UTC (rev 424)
@@ -74,11 +74,7 @@
int main(int argc, char* argv[]) {
- int res = 0;
char* progname = argv[0];
- char* errmsg;
- char* command = "";
- char* build = NULL;
char* path = (argc-- > 0) ? *++argv : NULL;
@@ -101,7 +97,7 @@
exit(1);
}
- CFIndex i,j;
+ CFIndex i;
CFIndex oldcount = CFArrayGetCount(oldprojs);
for(i = 0; i < oldcount; ++i) {
CFMutableDictionaryRef newdict = (CFMutableDictionaryRef)CFArrayGetValueAtIndex(oldprojs, i);
@@ -123,4 +119,6 @@
// CFDataRef data = CFPropertyListCreateXMLData(NULL, plist);
// fprintf(stdout, "%.*s", CFDataGetLength(data), CFDataGetBytePtr(data));
writePlist(stdout, plist, 0);
+
+ return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20081121/b88d7895/attachment-0001.html>
More information about the darwinbuild-changes
mailing list