cht電腦資訊gcin
adm Find login register

請幫忙解決 64bit-portability-issue

swyear
1 請幫忙解決 64bit-portability-issue
Promote 0 Bookmark 02011-06-05quote  

目前 1.6.4pre16 還有一些地方會出現 64bit-portability-issue

E: gcin 64bit-portability-issue eggtrayicon.cpp:247, 344, 367
E: gcin 64bit-portability-issue gcin-setup-gtab.cpp:170, 205
E: gcin 64bit-portability-issue gcin-setup-list.cpp:504, 542, 580
E: gcin 64bit-portability-issue gcin-setup-pho.cpp:328, 351, 390
E: gcin 64bit-portability-issue gcin-setup.cpp:536
E: gcin 64bit-portability-issue tslearn.cpp:236
E: gcin 64bit-portability-issue win-int.cpp:52


從 buildlog 找出來是在這些地方

eggtrayicon.cpp: In function 'egg_tray_icon_unrealize':
eggtrayicon.cpp:247:14: warning: assignment makes pointer from integer without a cast [enabled by default]
eggtrayicon.cpp: In function 'egg_tray_icon_update_manager_window':
eggtrayicon.cpp:344:14: warning: assignment makes pointer from integer without a cast [enabled by default]
eggtrayicon.cpp: In function 'egg_tray_icon_manager_window_destroyed':
eggtrayicon.cpp:367:10: warning: assignment makes pointer from integer without a cast [enabled by default]

gcin-setup-gtab.cpp: In function 'create_spc_opts':
gcin-setup-gtab.cpp:170:16: warning: assignment makes pointer from integer without a cast [enabled by default]
gcin-setup-gtab.cpp: In function 'create_auto_select_by_phrase_opts':
gcin-setup-gtab.cpp:205:29: warning: assignment makes pointer from integer without a cast [enabled by default]
gcin-setup-list.cpp: In function 'create_im_toggle_keys':
gcin-setup-list.cpp:504:22: warning: assignment makes pointer from integer without a cast [enabled by default]
gcin-setup-list.cpp: In function 'create_speaker_opts':
gcin-setup-list.cpp:542:20: warning: assignment makes pointer from integer without a cast [enabled by default]
gcin-setup-list.cpp: In function 'create_gcb_pos_opts':
gcin-setup-list.cpp:580:15: warning: assignment makes pointer from integer without a cast [enabled by default]

gcin-setup-pho.cpp: In function 'create_kbm_opts':
gcin-setup-pho.cpp:328:16: warning: assignment makes pointer from integer without a cast [enabled by default]
gcin-setup-pho.cpp:351:15: warning: assignment makes pointer from integer without a cast [enabled by default]
gcin-setup-pho.cpp: In function 'create_eng_ch_opts':
gcin-setup-pho.cpp:390:19: warning: assignment makes pointer from integer without a cast [enabled by default]

gcin-setup.cpp: In function 'create_gcin_edit_display':
gcin-setup.cpp:536:25: warning: assignment makes pointer from integer without a cast [enabled by default]

tslearn.cpp: In function 'create_pho_sel_area':
tslearn.cpp:236:24: warning: assignment makes pointer from integer without a cast [enabled by default]

win-int.cpp: In function 'create_int_opts':
win-int.cpp:52:16: warning: assignment makes pointer from integer without a cast [enabled by default]

希望老大有空修正一下

謝謝

eliu
2
Promote 0 Bookmark 02011-06-05quote  

懷疑是你的 build environment .h 太舊的問題。我看 function 都有 prototype

用 make eggtrayicon.E 可以看到 function 都有 prototype 的宣告,請確認 eggtrayicon.E 是否有藍色的這一行

 

eggtrayicon.cpp:247:14: warning: assignment makes pointer from integer without a cast [enabled by default]


eggtrayicon.E

GdkWindow* gdk_window_lookup_for_display (GdkDisplay *display,
          GdkNativeWindow anid);

……

static void
egg_tray_icon_unrealize (GtkWidget *widget)
{
  EggTrayIcon *icon = ((((EggTrayIcon*) g_type_check_instance_cast ((GTypeInstance*) ((widget)), ((egg_tray_icon_get_type ()))))));
  GdkWindow *root_window;

  if (icon->manager_window != 0L)
    {
      GdkWindow *gdkwin;


      gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
                                              icon->manager_window);



edited: 1
swyear
3
Promote 0 Bookmark 02011-06-05quote  

謝謝版主回覆

看起來的確是編譯環境的關係

在 Open Build Service 的 openSUSE 11.4 環境可以看到

+ cat eggtrayicon.E
+ grep gdk_window_lookup_for_display
GdkWindow* gdk_window_lookup_for_display (GdkDisplay *display,
      gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
      gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (((((GtkWidget*) g_type_check_instance_cast ((GTypeInstance*) ((icon)), ((gtk_widget_get_type ()))))))),
  gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (((((GtkWidget*) g_type_check_instance_cast ((GTypeInstance*) ((icon)), ((gtk_widget_get_type ()))))))),

但是在 openSUSE Factory 中只看到

+ cat eggtrayicon.E
+ grep gdk_window_lookup_for_display
      gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
      gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (((((GtkWidget*) g_type_check_instance_cast ((GTypeInstance*) ((icon)), ((gtk_widget_get_type ()))))))),
  gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (((((GtkWidget*) g_type_check_instance_cast ((GTypeInstance*) ((icon)), ((gtk_widget_get_type ()))))))),

應該是OBS有問題
謝謝您的回答
swyear
4
Promote 0 Bookmark 02011-06-05quote  

報告老大:

openSUSE Factory 用了 gtk2.24

而上面那些出現 64bit issue 的似乎都是用到了過期函數

http://developer.gnome.org/gdk/stable/gdk-X-Window-System-Interaction.html

像是 gdk_window_lookup_for_display

gtk_combo_box_new_text

...

可能要請您先預備一下了

caleb
5
Promote 0 Bookmark 02011-06-06quote  

swyear
而上面那些出現 64bit issue 的似乎都是用到了過期函數

像是 gdk_window_lookup_for_display

gtk_combo_box_new_text

之前為了 GTK+ 3.x 已經把這些函數都搞定了,不過有的版本偵測是限定在 >= 2.9x 。

本來是放在 gcin.h, 不過 gcin 1.6.4.pre18 以上版本移到了 gcin-gtk-compatible.h,

如果還是有問題可以調整 gcin-gtk-compatible.h 裡的版本偵測。

GTK+ 2.x 官方預定最終版本就停留在 2.24 系列,不會有 2.25 / 2.26 等等。

 

swyear
6
Promote 0 Bookmark 02011-06-07quote  

caleb

 

之前為了 GTK+ 3.x 已經把這些函數都搞定了,不過有的版本偵測是限定在 >= 2.9x 。

本來是放在 gcin.h, 不過 gcin 1.6.4.pre18 以上版本移到了 gcin-gtk-compatible.h,

如果還是有問題可以調整 gcin-gtk-compatible.h 裡的版本偵測。

GTK+ 2.x 官方預定最終版本就停留在 2.24 系列,不會有 2.25 / 2.26 等等。

 

謝謝大家,1.6.4.pre18 已經可以在 gtk2.24 編譯了

cht電腦資訊gcin
adm Find login register
views:12731