From 2390217a754410af6f05f48637f1a776c4c9968a Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Fri, 8 Oct 2021 17:25:17 +0900 Subject: [PATCH] Fix to decide data and return type explicity --- cde/programs/dtappbuilder/src/abmf/instances.c | 8 ++++---- cde/programs/dtappbuilder/src/abmf/parse_c.c | 1 + cde/programs/dtappbuilder/src/abmf/utils.c | 2 ++ cde/programs/dtappbuilder/src/abmf/write_c.c | 2 ++ cde/programs/dtappbuilder/src/libABil/bil.c | 1 + cde/programs/dtappbuilder/src/libABobj/obj_list.c | 1 + cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c | 1 + cde/programs/dtappbuilder/src/libAButil/util_file.c | 2 +- cde/programs/dtcm/dtcm/RFCMIME.c | 1 + cde/programs/dthelp/parser/canon1/helptag/help.c | 4 ++-- cde/programs/dthelp/parser/canon1/parser/cyclent.c | 2 +- cde/programs/dthelp/parser/pass1/helptag/help.c | 4 ++-- cde/programs/dthelp/parser/pass1/parser/cyclent.c | 2 +- cde/programs/dthelp/parser/pass2/htag2/sdl.c | 2 +- cde/programs/dthelp/parser/pass2/parser/cyclent.c | 2 +- cde/programs/dtlogin/auth.c | 2 +- cde/programs/dtlogin/genauth.c | 2 +- cde/programs/dtlogin/netaddr.c | 1 + cde/programs/dtlogin/server.c | 2 +- cde/programs/dtlogin/socket.c | 2 ++ cde/programs/dtsr/dtsrindex.c | 1 + cde/programs/dtstyle/Backdrop.c | 8 ++++---- cde/programs/dtstyle/ColorEdit.c | 2 +- 23 files changed, 34 insertions(+), 21 deletions(-) diff --git a/cde/programs/dtappbuilder/src/abmf/instances.c b/cde/programs/dtappbuilder/src/abmf/instances.c index 05b0ba7ee..c133d4a5c 100644 --- a/cde/programs/dtappbuilder/src/abmf/instances.c +++ b/cde/programs/dtappbuilder/src/abmf/instances.c @@ -246,7 +246,7 @@ write_assign_local_vars_for_icon(GenCodeInfo genCodeInfo, ABObj obj) * Assigns values to local variables to create the label for * this object */ -static +static int write_assign_local_vars_for_label(GenCodeInfo genCodeInfo, ABObj obj) { File codeFile = genCodeInfo->code_file; @@ -369,7 +369,7 @@ write_assign_local_vars_for_label(GenCodeInfo genCodeInfo, ABObj obj) * Assigns values to local variables to create the Accelerator Text for * this object */ -static +static int write_assign_local_vars_for_acceltext(GenCodeInfo genCodeInfo, ABObj obj) { File codeFile = genCodeInfo->code_file; @@ -409,7 +409,7 @@ write_assign_local_vars_for_acceltext(GenCodeInfo genCodeInfo, ABObj obj) * Assigns values to local variables to create the Value for this object * (valid only for text fields and text panes). */ -static +static int write_assign_local_vars_for_value(GenCodeInfo genCodeInfo, ABObj obj) { File codeFile = genCodeInfo->code_file; @@ -447,7 +447,7 @@ write_assign_local_vars_for_value(GenCodeInfo genCodeInfo, ABObj obj) * Assigns values to local variables to create button label strings for * file choosers */ -static +static int write_assign_local_vars_for_fchooser(GenCodeInfo genCodeInfo, ABObj obj) { File codeFile = genCodeInfo->code_file; diff --git a/cde/programs/dtappbuilder/src/abmf/parse_c.c b/cde/programs/dtappbuilder/src/abmf/parse_c.c index 83c82d1f2..a73e6234a 100644 --- a/cde/programs/dtappbuilder/src/abmf/parse_c.c +++ b/cde/programs/dtappbuilder/src/abmf/parse_c.c @@ -788,6 +788,7 @@ reverse_string(STRING buf) * Gets the next C segment from the file. */ +int get_seg(BFile file, CSeg cseg) { int return_value = 0; diff --git a/cde/programs/dtappbuilder/src/abmf/utils.c b/cde/programs/dtappbuilder/src/abmf/utils.c index 6cfd7f2f0..4aed5baa0 100644 --- a/cde/programs/dtappbuilder/src/abmf/utils.c +++ b/cde/programs/dtappbuilder/src/abmf/utils.c @@ -500,6 +500,7 @@ abmfP_assign_widget_names(ABObj root) } +int abmfP_tree_set_written(ABObj root, BOOL written) { AB_TRAVERSAL trav; @@ -515,6 +516,7 @@ abmfP_tree_set_written(ABObj root, BOOL written) } +int abmfP_obj_set_items_written(ABObj rootObj, BOOL written) { AB_TRAVERSAL trav; diff --git a/cde/programs/dtappbuilder/src/abmf/write_c.c b/cde/programs/dtappbuilder/src/abmf/write_c.c index 54d400c30..83f3da138 100644 --- a/cde/programs/dtappbuilder/src/abmf/write_c.c +++ b/cde/programs/dtappbuilder/src/abmf/write_c.c @@ -583,6 +583,7 @@ abmfP_write_tooltalk_callback_begin( +int abmfP_write_clear_proc_decl( GenCodeInfo genCodeInfo, ABObj obj @@ -979,6 +980,7 @@ abmfP_write_file_footer( return 0; } +int abmfP_write_msg_clear_proc_decl( GenCodeInfo genCodeInfo, ABObj module diff --git a/cde/programs/dtappbuilder/src/libABil/bil.c b/cde/programs/dtappbuilder/src/libABil/bil.c index 575a64455..ac4702a00 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil.c +++ b/cde/programs/dtappbuilder/src/libABil/bil.c @@ -2563,6 +2563,7 @@ bilP_tt_desktop_level_to_string(AB_TOOLTALK_LEVEL tt_level) return (string); } +BIL_TOKEN bilP_default_button_to_token(AB_DEFAULT_BUTTON button) { BIL_TOKEN token = AB_BIL_UNDEF; diff --git a/cde/programs/dtappbuilder/src/libABobj/obj_list.c b/cde/programs/dtappbuilder/src/libABobj/obj_list.c index 58b25ea55..43ec5b37c 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj_list.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj_list.c @@ -490,6 +490,7 @@ objlist_dup(ABObjList list) **************************************************************************/ +static int objlistP_shrink_array(ABObjList list, int sizeDiff) { int return_value = 0; diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c index 7598c9659..c115940e3 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c @@ -475,6 +475,7 @@ objxm_remove_arg( /* * Set attachment Resources for a Composite Object hierarchy */ +int objxm_comp_set_attachment_args( ABObj obj, OBJXM_CONFIG_TYPE ctype diff --git a/cde/programs/dtappbuilder/src/libAButil/util_file.c b/cde/programs/dtappbuilder/src/libAButil/util_file.c index e1c3e3247..9a194f889 100644 --- a/cde/programs/dtappbuilder/src/libAButil/util_file.c +++ b/cde/programs/dtappbuilder/src/libAButil/util_file.c @@ -257,7 +257,7 @@ util_get_dir_name_from_path( #ifdef __cplusplus extern "C" { #endif - extern ftruncate(int filedes, off_t length); + extern int ftruncate(int filedes, off_t length); #ifdef __cplusplus } // extern "C" #endif diff --git a/cde/programs/dtcm/dtcm/RFCMIME.c b/cde/programs/dtcm/dtcm/RFCMIME.c index cbbda7252..af8e2c0b9 100644 --- a/cde/programs/dtcm/dtcm/RFCMIME.c +++ b/cde/programs/dtcm/dtcm/RFCMIME.c @@ -965,6 +965,7 @@ base64size(const unsigned long len) return(b_len); } +Encoding getEncodingType(const char * body, const unsigned int len, boolean_t strict_mime) diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.c b/cde/programs/dthelp/parser/canon1/helptag/help.c index 40c6cf444..cefea973d 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.c +++ b/cde/programs/dthelp/parser/canon1/helptag/help.c @@ -2177,7 +2177,7 @@ return(newstring); int NextId(void) { -static id = 0; +static int id = 0; return ++id; } @@ -2713,7 +2713,7 @@ M_WCHAR *CycleEnt(LOGICAL init, { static M_TRIE *current ; static M_TRIE *ancestor[M_NAMELEN + 1] ; -static length = 0 ; +static int length = 0 ; static M_WCHAR name[M_NAMELEN + 1] ; if (init) diff --git a/cde/programs/dthelp/parser/canon1/parser/cyclent.c b/cde/programs/dthelp/parser/canon1/parser/cyclent.c index 974fe4f9d..ed6131873 100644 --- a/cde/programs/dthelp/parser/canon1/parser/cyclent.c +++ b/cde/programs/dthelp/parser/canon1/parser/cyclent.c @@ -40,7 +40,7 @@ M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigne { static M_TRIE *current ; static M_TRIE *ancestor[M_NAMELEN + 1] ; - static length = 0 ; + static int length = 0 ; static M_WCHAR name[M_NAMELEN + 1] ; if (init) { diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.c b/cde/programs/dthelp/parser/pass1/helptag/help.c index 97060a6ba..76c7ec9f3 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.c +++ b/cde/programs/dthelp/parser/pass1/helptag/help.c @@ -2164,7 +2164,7 @@ return(newstring); int NextId(void) { -static id = 0; +static int id = 0; return ++id; } @@ -2700,7 +2700,7 @@ M_WCHAR *CycleEnt(LOGICAL init, { static M_TRIE *current ; static M_TRIE *ancestor[M_NAMELEN + 1] ; -static length = 0 ; +static int length = 0 ; static M_WCHAR name[M_NAMELEN + 1] ; if (init) diff --git a/cde/programs/dthelp/parser/pass1/parser/cyclent.c b/cde/programs/dthelp/parser/pass1/parser/cyclent.c index eaa6532f7..c63c433fd 100644 --- a/cde/programs/dthelp/parser/pass1/parser/cyclent.c +++ b/cde/programs/dthelp/parser/pass1/parser/cyclent.c @@ -40,7 +40,7 @@ M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigne { static M_TRIE *current ; static M_TRIE *ancestor[M_NAMELEN + 1] ; - static length = 0 ; + static int length = 0 ; static M_WCHAR name[M_NAMELEN + 1] ; if (init) { diff --git a/cde/programs/dthelp/parser/pass2/htag2/sdl.c b/cde/programs/dthelp/parser/pass2/htag2/sdl.c index 7c50e04f6..17672f1ea 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/sdl.c +++ b/cde/programs/dthelp/parser/pass2/htag2/sdl.c @@ -6467,7 +6467,7 @@ static M_WCHAR *CycleEnt(LOGICAL init, { static M_TRIE *current ; static M_TRIE *ancestor[M_NAMELEN + 1] ; -static length = 0 ; +static int length = 0 ; static M_WCHAR name[M_NAMELEN + 1] ; if (init) diff --git a/cde/programs/dthelp/parser/pass2/parser/cyclent.c b/cde/programs/dthelp/parser/pass2/parser/cyclent.c index 0852fabce..08b356910 100644 --- a/cde/programs/dthelp/parser/pass2/parser/cyclent.c +++ b/cde/programs/dthelp/parser/pass2/parser/cyclent.c @@ -40,7 +40,7 @@ M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigne { static M_TRIE *current ; static M_TRIE *ancestor[M_NAMELEN + 1] ; - static length = 0 ; + static int length = 0 ; static M_WCHAR name[M_NAMELEN + 1] ; if (init) { diff --git a/cde/programs/dtlogin/auth.c b/cde/programs/dtlogin/auth.c index a019faf3b..64f807f40 100644 --- a/cde/programs/dtlogin/auth.c +++ b/cde/programs/dtlogin/auth.c @@ -696,7 +696,7 @@ checkEntry (Xauth *auth) static int doWrite; -static +static int writeAuth (FILE *file, Xauth *auth) { if (debugLevel >= 15) { /* normally too verbose */ diff --git a/cde/programs/dtlogin/genauth.c b/cde/programs/dtlogin/genauth.c index a2b4ea7d0..f77fb83fc 100644 --- a/cde/programs/dtlogin/genauth.c +++ b/cde/programs/dtlogin/genauth.c @@ -127,7 +127,7 @@ static unsigned char key[8]; static long key[2]; #endif -static sumFile (char *name, long sum[2]); +static int sumFile (char *name, long sum[2]); #ifdef HASXDMAUTH diff --git a/cde/programs/dtlogin/netaddr.c b/cde/programs/dtlogin/netaddr.c index aa6354122..dc477b187 100644 --- a/cde/programs/dtlogin/netaddr.c +++ b/cde/programs/dtlogin/netaddr.c @@ -221,6 +221,7 @@ int ConvertAddr (XdmcpNetaddr saddr, int *len, char **addr) return retval; } +int addressEqual (XdmcpNetaddr a1, int len1, XdmcpNetaddr a2, int len2) { int partlen1, partlen2; diff --git a/cde/programs/dtlogin/server.c b/cde/programs/dtlogin/server.c index c9a611dcc..ffb3a71cb 100644 --- a/cde/programs/dtlogin/server.c +++ b/cde/programs/dtlogin/server.c @@ -54,7 +54,7 @@ # include "dm.h" # include "vgmsg.h" -static receivedUsr1; +static int receivedUsr1; diff --git a/cde/programs/dtlogin/socket.c b/cde/programs/dtlogin/socket.c index 5f3044ba5..ea930ed8f 100644 --- a/cde/programs/dtlogin/socket.c +++ b/cde/programs/dtlogin/socket.c @@ -105,6 +105,7 @@ extern int chooserFd; extern FD_TYPE WellKnownSocketsMask; extern int WellKnownSocketsMax; +int CreateWellKnownSockets (void) { struct sockaddr_in sock_addr; @@ -154,6 +155,7 @@ CreateWellKnownSockets (void) FD_SET (chooserFd, &WellKnownSocketsMask); } +int GetChooserAddr (char *addr, int *lenp) { struct sockaddr_in in_addr; diff --git a/cde/programs/dtsr/dtsrindex.c b/cde/programs/dtsr/dtsrindex.c index 26ab3005a..dcc4e9b62 100644 --- a/cde/programs/dtsr/dtsrindex.c +++ b/cde/programs/dtsr/dtsrindex.c @@ -1359,6 +1359,7 @@ static void load_into_bintree ( /* MAIN */ /* */ /**********************************************/ +int main (int argc, char **argv) { int i; diff --git a/cde/programs/dtstyle/Backdrop.c b/cde/programs/dtstyle/Backdrop.c index 9a0046439..5dfdd1f87 100644 --- a/cde/programs/dtstyle/Backdrop.c +++ b/cde/programs/dtstyle/Backdrop.c @@ -101,9 +101,9 @@ will not operate because there are no backdrop\nfiles available. Check $HOME/.dt static int CreateBackdropDialog( Widget parent) ; static void MoreBitmaps( void ) ; -static ReadBitmaps( void ) ; +static int ReadBitmaps( void ) ; static Boolean CreatePixmaps( void ) ; -static ReadBitmapDirectory( char *dir ) ; +static int ReadBitmapDirectory( char *dir ) ; static void DrawBitmap( Widget w, XtPointer client_data, @@ -557,7 +557,7 @@ cmpstringp(const void *p1, const void *p2) * resource. * 4) Read the user's home directory /$HOME/.dt/backdrops. ************************************************************************/ -static +static int ReadBitmaps( void ) { int status; @@ -686,7 +686,7 @@ CreatePixmaps( void ) * ReadBitmapDirectory() * Create an array of bitmap names overriding duplicates ************************************************************************/ -static +static int ReadBitmapDirectory( char *dir ) diff --git a/cde/programs/dtstyle/ColorEdit.c b/cde/programs/dtstyle/ColorEdit.c index e125a6a41..41140738e 100644 --- a/cde/programs/dtstyle/ColorEdit.c +++ b/cde/programs/dtstyle/ColorEdit.c @@ -162,7 +162,7 @@ EditData edit; /* Internal Variables */ /*+++++++++++++++++++++++++++++++++++++++*/ static saveRestore save = {FALSE, 0, }; -static OldNewSame = False; +static Boolean OldNewSame = False; /************************************************************************ * ColorEditor() - Create ColorEditor dialog first time up.