Bug ID |
10979
|
Summary |
GPOINTER_TO_UINT in C++ code for 64bit Solaris wouldn't compile
|
Product |
Wireshark
|
Version |
1.99.x (Experimental)
|
Hardware |
x86
|
OS |
Solaris
|
Status |
UNCONFIRMED
|
Severity |
Major
|
Priority |
Low
|
Component |
Qt UI
|
Assignee |
[email protected]
|
Reporter |
[email protected]
|
Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
/ws/on12-tools/SUNWspro/solarisstudio12.3/bin/CC -DHAVE_CONFIG_H -I.
-I/builds/psumbera/userland-qt/components/wireshark-qt/wireshark-1.99.2/ui/qt
-I../..
-I/builds/psumbera/userland-qt/components/wireshark-qt/wireshark-1.99.2
-I/builds/psumbera/userland-qt/components/wireshark-qt/wireshark-1.99.2/wiretap
-DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DQT_GUI_LIB
-I/usr/include -I/usr/include/kerberosv5
'-DPLUGIN_INSTALL_DIR="/usr/lib/amd64/wireshark/plugins/1.99.2"' -norunpath
-m64 -DQT_SHARED -I/builds/psumbera/qt4/include
-I/builds/psumbera/qt4/include/QtCore -DQT_SHARED
-I/builds/psumbera/qt4/include -I/builds/psumbera/qt4/include/QtGui
-I/builds/psumbera/qt4/include/QtCore -D_REENTRANT -D_PTHREADS
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c -o decode_as_dialog.o
decode_as_dialog.cpp
"decode_as_dialog.cpp", line 103: Error: Cannot cast from void* to unsigned.
Basically following C++ code:
gpointer value=(gpointer*)123;
uint num_val = GPOINTER_TO_UINT(value);
wouldn't compile into 64bit on Solaris with both Solaris Studio and GNU
compiler.
It builds on:
Linux 64bit (g++)
Solaris 32bit (g++ -m32 or CC -m32)
Note that when it's used in C code it builds.
g++ error is:
decode_as_dialog.cpp:103:24: error: cast from ‘gpointer {aka void*}’ to ‘guint
{aka unsigned int}’ loses precision [-fpermissive]
There is probably more occurance of this:
$ ggrep -r GPOINTER_TO wireshark-1.99.2/ui/qt/
wireshark-1.99.2/ui/qt/decode_as_dialog.cpp: uint num_val =
GPOINTER_TO_UINT(value);
wireshark-1.99.2/ui/qt/decode_as_dialog.cpp: int proto_id =
GPOINTER_TO_INT(wmem_list_frame_data(protos));
wireshark-1.99.2/ui/qt/follow_stream_dialog.cpp: int
proto_ssl = GPOINTER_TO_INT(ssl);
wireshark-1.99.2/ui/qt/main_window_slots.cpp: ConversationDialog
*conv_dialog = new ConversationDialog(*this, capture_file_,
GPOINTER_TO_INT(userdata), arg);
wireshark-1.99.2/ui/qt/main_window_slots.cpp: EndpointDialog *endp_dialog =
new EndpointDialog(*this, capture_file_, GPOINTER_TO_INT(userdata), arg);
You are receiving this mail because:
- You are watching all bug changes.