Commit 3fc03e36 authored by steveblock@google.com's avatar steveblock@google.com

2010-11-08 Steve Block <steveblock@google.com>

        Reviewed by David Levin.

        Building for Android generates several compiler warnings
        https://bugs.webkit.org/show_bug.cgi?id=49175

        Fixes these warnings, most of which are trivial.
        - PREFIX_FOR_WEBCORE was previously required for STL's algorithm, but is no
          longer. See
          http://android.git.kernel.org/?p=platform/external/webkit.git;a=commit;h=a47ab5294213cca2741f453b450b02666e08cac8
        - The definition of EXPORT is required only for the JNI entry point in
          WebKit/android, so does not need to be in WebCorePrefix.h

        No new tests, fixes compile warnings only.

        * WebCorePrefix.h:
        * bridge/jni/jsc/JNIUtilityPrivate.cpp:
        (JSC::Bindings::convertValueToJValue):
        * platform/android/FileSystemAndroid.cpp:
        (WebCore::listDirectory):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 282a8380
2010-11-08 Steve Block <steveblock@google.com>
Reviewed by David Levin.
Building for Android generates several compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=49175
Fixes these warnings, most of which are trivial.
- PREFIX_FOR_WEBCORE was previously required for STL's algorithm, but is no
longer. See
http://android.git.kernel.org/?p=platform/external/webkit.git;a=commit;h=a47ab5294213cca2741f453b450b02666e08cac8
- The definition of EXPORT is required only for the JNI entry point in
WebKit/android, so does not need to be in WebCorePrefix.h
No new tests, fixes compile warnings only.
* WebCorePrefix.h:
* bridge/jni/jsc/JNIUtilityPrivate.cpp:
(JSC::Bindings::convertValueToJValue):
* platform/android/FileSystemAndroid.cpp:
(WebCore::listDirectory):
2010-11-08 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
......@@ -64,14 +64,6 @@
#endif
#endif // defined(WIN32) || defined(_WIN32)
#if defined(ANDROID)
#ifdef __cplusplus
// Must come before include of algorithm.
#define PREFIX_FOR_WEBCORE 1
#define EXPORT __attribute__((visibility("default")))
#endif
#endif
#if !defined(BUILDING_BREWMP__)
#include <sys/types.h>
#include <fcntl.h>
......
......@@ -200,7 +200,8 @@ jvalue convertValueToJValue(ExecState* exec, RootObject* rootObject, JSValue val
} else if (object->classInfo() == &JSArray::info) {
// Input is a Javascript Array. We need to create it to a Java Array.
result.l = convertArrayInstanceToJavaArray(exec, asArray(value), javaClassName);
} else if (!result.l && (!strcmp(javaClassName, "java.lang.Object")) || (!strcmp(javaClassName, "netscape.javascript.JSObject"))) {
} else if ((!result.l && (!strcmp(javaClassName, "java.lang.Object")))
|| (!strcmp(javaClassName, "netscape.javascript.JSObject"))) {
// Wrap objects in JSObject instances.
JNIEnv* env = getJNIEnv();
jclass jsObjectClass = env->FindClass("sun/plugin/javascript/webkit/JSObject");
......
......@@ -88,17 +88,15 @@ Vector<String> listDirectory(const String& path, const String& filter)
DIR* dir = opendir(cpath.data());
if (dir) {
struct dirent* dp;
while (dp = readdir(dir)) {
while ((dp = readdir(dir))) {
const char* name = dp->d_name;
if (!strcmp(name, ".") || !strcmp(name, ".."))
continue;
if (fnmatch(cfilter.data(), name, 0))
continue;
char filePath[1024];
if ((int) (sizeof(filePath) - 1) < snprintf(filePath,
sizeof(filePath), "%s/%s", cpath.data(), name)) {
if (static_cast<int>(sizeof(filePath) - 1) < snprintf(filePath, sizeof(filePath), "%s/%s", cpath.data(), name))
continue; // buffer overflow
}
entries.append(filePath);
}
closedir(dir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment