diff options
author | Thomas Fitzsimmons <fitzsim@redhat.com> | 2003-12-02 21:00:05 +0000 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@gcc.gnu.org> | 2003-12-02 21:00:05 +0000 |
commit | 5f8a45f75c9e3785bb7146721910d6ffe4e9d7e6 (patch) | |
tree | 9774794a08f9479c04344553102f79a307bc373a /libjava/jni | |
parent | e7f2e92fcbdd42fa43ba9a742685c0c6b18b65f4 (diff) | |
download | gcc-5f8a45f75c9e3785bb7146721910d6ffe4e9d7e6.zip gcc-5f8a45f75c9e3785bb7146721910d6ffe4e9d7e6.tar.gz gcc-5f8a45f75c9e3785bb7146721910d6ffe4e9d7e6.tar.bz2 |
2003-12-02 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c
(initState): Mark obj parameter as unused.
(stringWidth): Mark obj parameter as unused. Initialize
font_name properly.
From-SVN: r74198
Diffstat (limited to 'libjava/jni')
-rw-r--r-- | libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c index b7cef69..6036db7 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c @@ -47,7 +47,7 @@ exception statement from your version. */ #define NUM_METRICS 5 JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GdkFontMetrics_initState - (JNIEnv *env, jobject obj, jstring fname, jint size) + (JNIEnv *env, jobject obj __attribute__((unused)), jstring fname, jint size) { jintArray array; jint *metrics; @@ -93,7 +93,8 @@ JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GdkFontMetrics_initState } JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkFontMetrics_stringWidth - (JNIEnv *env, jobject obj, jstring fname, jint size, jstring str) + (JNIEnv *env, jobject obj __attribute__((unused)), + jstring fname, jint size, jstring str) { PangoFontDescription *font_desc; PangoContext *context; @@ -103,6 +104,7 @@ JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkFontMetrics_stringWidth const char *font_name; cstr = (*env)->GetStringUTFChars (env, str, NULL); + font_name = (*env)->GetStringUTFChars (env, fname, NULL); gdk_threads_enter (); @@ -121,6 +123,7 @@ JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkFontMetrics_stringWidth gdk_threads_leave (); + (*env)->ReleaseStringUTFChars (env, fname, font_name); (*env)->ReleaseStringUTFChars (env, str, cstr); return width; |