After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 356095 - Compilation warning in gda-value.h
Compilation warning in gda-value.h
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: Client library
1.2.x
Other All
: Normal minor
: ---
Assigned To: Rodrigo Moya
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-09-15 09:00 UTC by Jose Dapena Paz
Modified: 2006-12-27 16:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to remove the const declaration in gda-value.h (3.33 KB, patch)
2006-09-15 09:02 UTC, Jose Dapena Paz
none Details | Review

Description Jose Dapena Paz 2006-09-15 09:00:58 UTC
Please describe the problem:
On compiling, gda-value.h gives a warning. It prevents compiling software with -Werror that uses GdaValue.

Steps to reproduce:
1. Create a piece of software that uses GdaValue (including gda-value.h).
2. Compile this software with -Werror



Actual results:
An error like this:
In file included from /usr/include/libgda-1.2/libgda/gda-field.h:27,
                 from /usr/include/libgda-1.2/libgda/gda-row.h:27,
                 from /usr/include/libgda-1.2/libgda/gda-data-model.h:30,
                 from /usr/include/libgda-1.2/libgda/gda-connection.h:28,
                 from /usr/include/libgda-1.2/libgda/gda-client.h:27,
                 from /usr/include/libgda-1.2/libgda/libgda.h:28,
                 from /usr/include/libfisterra-server/f_egb_util.h:27,
                 from f_dao_replication_module.h:31,
                 from f_dao_replication_module.c:25:
/usr/include/libgda-1.2/libgda/gda-value.h:183: warning: type qualifiers ignored on function return type


Expected results:
No warning

Does this happen every time?
Yes, if you use gcc 4.x

Other information:
The problem is with the use of const in a non-pointer type:
G_CONST_RETURN gpointer gda_value_get_binary (GdaValue *value, glong *size);

It's not allowed. The macro should be removed in this function declaration.
Comment 1 Jose Dapena Paz 2006-09-15 09:02:39 UTC
Created attachment 72845 [details] [review]
Patch to remove the const declaration in gda-value.h

This patch drops the warning with gcc 4.x in gda-value.h.
Comment 2 Murray Cumming 2006-12-27 16:43:13 UTC
This function now returns a GdaBinary*, so I think the use of const is OK now. Please reopen this bug if I am wrong.