What does the warning message 724 "Cast converts default int return type to." tell me.
I am new to C. (used it some in college). We are migrating our c-code to 10.2.0.3.0. The programs compiled clean. However there were several warning messages that kick out. The most prominent warning is:
Pro*C/C++: Release 10.2.0.3.0 - Production on Mon Apr 23 09:47:08 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
System default option values taken from: /u21/oracle/product/102030_64/precomp/g
cc -DCACS_ORA -O -g -DDEBUG +DA2.0W +DS2.0 -DSS_64BIT_SERVER -I. -Ic
cc: "drmio.pc", line 86: warning 724: Cast converts default int return type to .
cc: "drmio.pc", line 825: warning 724: Cast converts default int return type to.
I believe it is a 32 bit -> 64 bit issue. (pointers are now 64 bits)
Any assistance that can be provided would be greatly appreciated. Thank you
Below is a snipit of line 86 with declarations:
#include <stdio.h>
#include "drm.h"
/VA-28 - 07/25/01 - Begin/
/-- modify for the cache --/
#include "drm_mods.h"
/VA-28 - 07/25/01 - End/
#define IsItNullColumn(column_name) (column_name == -1)
#define AssignNullStr(char_array) strcpy(char_array,"")
#define SQL_NO_ERROR 0
#define SQL_NOT_FOUND +100
EXEC SQL INCLUDE SQLCA ;
TEMPLATE_ELEMENT *gstr_db_element = NULL ;
OLD_DOC_ELEMENT *gstr_olddoc_element = NULL ;
int gai_element_array[SIZE\_MAX\_NO\_OF_ELEMENTS] ;
int gi_max_database_elements = 0 ;
int gi_max_olddoc_elements = 0 ;
extern int gi_max_elements ;
int gi_max_elements ;
char gac_default_unix_date_format[] = "%D %T" ;
int GetElementInfo_i(int ar_ai_element_id[] )
{
/VA-28 - 07/25/01 - Begin/
/*--
EXEC SQL BEGIN DECLARE SECTION ;
int li_id ;
int li_retrieval_type ;
int li_criteria_id ;
char lac_table_name[SIZE\_TBL_NAME] ;
EXEC SQL VAR lac_table_name is STRING(SIZE_TBL_NAME);
char lac_fld_name[SIZE\_FLD_NAME] ;
EXEC SQL VAR lac_fld_name is STRING(SIZE_FLD_NAME);
char lac_fun_name[SIZE\_FUNC_NAME] ;
EXEC SQL VAR lac_fun_name is STRING(SIZE_FUNC_NAME);
int li_format_fun_id ;
char lac_word_format[SIZE_FORMAT] ;
EXEC SQL VAR lac_word_format is STRING(SIZE_FORMAT);
short lshort\_criteria\_null_ind,
lshort\_tablename\_null_ind,
lshort\_fldname\_null_ind,
lshort\_funname\_null_ind,
lshort\_formatfun\_null_ind,
lshort\_wordformat\_null_ind ;
--*/
/*-- EXEC SQL END DECLARE SECTION ;--*/
/*VA-28 - 07/25/01 - End*/
int count = 0 ;
/*VA-28 - 07/25/01 - Begin*/
int i = 0;
int li_id;
/*-- [ARCS Mods] Debug Messages --*/
DebugPrintf\("In GetElementInfo_i\(\)\\n"\);
DebugPrintf\("gi\_max_elements = %d\\n", gi\_max_elements\);
DebugPrintf\("g\_max\_cache\_db_elements = %d\\n", g\_max\_cache\_db_elements\);
/*VA-28 - 07/25/01 - End*/
if \( gi\_max_elements <= 0 \)
\{
return\(-1\) ;
\}
gi\_max\_database_elements = gi\_max_elements ;
gstr\_db_element = \(TEMPLATE_ELEMENT *\)DoMemoryAlloc\_pv\(gi\_max_elements * sizeof\(TEMPLATE_ELEMENT\)\) ; \(line 86\)
if \( gstr\_db_element == \(TEMPLATE_ELEMENT *\)NULL \)
\{
return\(-1\) ;
\}