Bug 593564

Summary: Warnings when using sql_create_N() macros containing mysqlpp::Null<>
Product: [Fedora] Fedora Reporter: Andris Pavenis <andris.pavenis>
Component: mysql++Assignee: Remi Collet <fedora>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-04 14:10:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix the warning
none
Patch for specfile none

Description Andris Pavenis 2010-05-19 07:09:09 UTC
Created attachment 415039 [details]
Patch to fix the warning

Description of problem:

I'm getting warning about unused parameter n in

mysqlpp::Null& operator =(const null_types& n)

when using mysqlpp::Null<> in sql_create macros
 

Version-Release number of selected component (if applicable):

3.0.9-3

Comment 1 Andris Pavenis 2010-05-19 07:13:06 UTC
Created attachment 415040 [details]
Patch for specfile

Comment 2 Andris Pavenis 2010-05-19 07:33:42 UTC
There are some more warning coming from sql_create_n:

--------------- example ----------------
#include <mysql++.h>
#include <ssqls.h>

sql_create_3(
    test_table,
    1, 3,

    mysqlpp::sql_int,             user_id,
    mysqlpp::sql_varchar,         user_name,
    mysqlpp::sql_varchar,         user_hash);

std::vector<test_table> data;
------------------------------------------

[apavenis@callisto mysql++]$ g++ -c -Wall -Wextra -I/usr/include/mysql++ -I/usr/include/mysql sql_create_warn.cpp
sql_create_warn.cpp:10: warning: type qualifiers ignored on function return type

I also got one more warning:
 warning: ‘<unnamed>::sync_user::names’ defined but not used
from real code (not example) friom the same source line but failed to reproduce it in this example.

Comment 3 Remi Collet 2010-05-19 07:35:41 UTC
s this bug reported upstream ? (link ?)
Is this patch from upstream SVN ? (commit ref ?)

Comment 4 Andris Pavenis 2010-05-19 08:10:38 UTC
I haven't reported it and did not check SVN version.

Comment 5 Remi Collet 2010-05-19 17:00:58 UTC
Read : http://lists.mysql.com/plusplus/8955

As new version 3.1.0 with fixes included is imminent, I think we could wait for it

Comment 6 Remi Collet 2010-09-04 14:10:08 UTC
Version 3.1.0 is available in repository.