Fix some compiler warnings, cleaner build logs (#517)
- Fix a few compiler warnings
- Disable logging entire env for run script phase
diff --git a/ios-deploy.xcodeproj/project.pbxproj b/ios-deploy.xcodeproj/project.pbxproj
index 3798699..2539f72 100644
--- a/ios-deploy.xcodeproj/project.pbxproj
+++ b/ios-deploy.xcodeproj/project.pbxproj
@@ -238,6 +238,7 @@
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"\\\"# AUTO-GENERATED - DO NOT MODIFY\\\\\\n\\\"\" > src/ios-deploy/lldb.py.h\nawk '{ print \"\\\"\"$0\"\\\\n\\\"\"}' src/scripts/lldb.py >> src/ios-deploy/lldb.py.h\n";
+ showEnvVarsInLog = 0;
};
C0CD3D981F59D20100F954DB /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -251,6 +252,7 @@
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "mkdir -p \"${PROJECT_DIR}/_Frameworks\"\n\n# copy over MobileDevice.framework from its location\nMD_FRAMEWORK_LOCATION=/System/Library/PrivateFrameworks/MobileDevice.framework\nif [ -d \"$MD_FRAMEWORK_LOCATION\" ]; then\n rsync -r $MD_FRAMEWORK_LOCATION \"${PROJECT_DIR}/_Frameworks\" --exclude=XPCServices --links\nfi\n\n# check if this new location exists, if it does, copy it instead\nNEW_MD_FRAMEWORK_LOCATION=/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework\nif [ -d \"$NEW_MD_FRAMEWORK_LOCATION\" ]; then\nrsync -r $NEW_MD_FRAMEWORK_LOCATION \"${PROJECT_DIR}/_Frameworks\" --exclude=XPCServices --links\nfi\n\n";
+ showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
diff --git a/src/ios-deploy/ios-deploy.m b/src/ios-deploy/ios-deploy.m
index 6fda31a..d235791 100644
--- a/src/ios-deploy/ios-deploy.m
+++ b/src/ios-deploy/ios-deploy.m
@@ -298,7 +298,7 @@
return NULL;
}
-CFStringRef copy_xcode_dev_path() {
+CFStringRef copy_xcode_dev_path(void) {
static char xcode_dev_path[256] = { '\0' };
if (strlen(xcode_dev_path) == 0) {
FILE *fpipe = NULL;
@@ -318,7 +318,7 @@
return CFStringCreateWithCString(NULL, xcode_dev_path, kCFStringEncodingUTF8);
}
-const char *get_home() {
+const char *get_home(void) {
const char* home = getenv("HOME");
if (!home) {
struct passwd *pwd = getpwuid(getuid());
@@ -1108,7 +1108,7 @@
CFRelease(s);
return;
}
- int sent = AMDServiceConnectionSend(dbgServiceConnection, CFDataGetBytePtr(data), CFDataGetLength (data));
+ int __unused sent = AMDServiceConnectionSend(dbgServiceConnection, CFDataGetBytePtr(data), CFDataGetLength (data));
assert (CFDataGetLength (data) == sent);
}
@@ -1283,7 +1283,7 @@
_exit(WEXITSTATUS(status));
}
-pid_t bring_process_to_foreground() {
+pid_t bring_process_to_foreground(void) {
pid_t fgpid = tcgetpgrp(STDIN_FILENO);
if (setpgid(0, 0) == -1)
perror("setpgid failed");
@@ -2377,7 +2377,7 @@
[NSString stringWithUTF8String:app]);
}
-void show_version() {
+void show_version(void) {
NSLogOut(@"%@", @
#include "version.h"
);