Hi, On Mon, May 13, 2013 at 08:58:50PM +0900, Takatoshi MATSUO wrote: > Hi > > I am compiling cluster-glue under fedora 18, > and it returns an error. > > It seems that the specification of "FORTIFY_SOURCE" is changed. > How should I fix ?
Sorry for the delay. There were quite a few issues. Can you please test the attached patches? Lars, can you please take a look too. Cheers, Dejan > I use these operations under glibc-2.16-31.fc18.x86_64. > ----------------------------- > # hg clone http://hg.linux-ha.org/glue cluster-glue > # cd cluster-glue > # make rpm > rm -f cluster-glue.tar.bz2 > hg archive -t tbz2 -r tip cluster-glue.tar.bz2 > <snip> > libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../include > -I../include -I../include -I../linux-ha -I../linux-ha > -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include > -I/usr/include/libxml2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 > -mtune=generic -ggdb3 -O0 -fgnu89-inline -fstack-protector-all -Wall > -Waggregate-return -Wbad-function-cast -Wcast-qual -Wcast-align > -Wdeclaration-after-statement -Wendif-labels -Wfloat-equal -Wformat=2 > -Wformat-security -Wformat-nonliteral -Winline -Wmissing-prototypes > -Wmissing-declarations -Wmissing-format-attribute -Wnested-externs > -Wno-long-long -Wno-strict-aliasing -Wpointer-arith > -Wstrict-prototypes -Wwrite-strings -ansi -D_GNU_SOURCE -DANSI_ONLY > -Werror -c strlcpy.c -fPIC -DPIC -o .libs/strlcpy.o > In file included from /usr/include/limits.h:26:0, > from > /usr/lib/gcc/x86_64-redhat-linux/4.7.2/include/limits.h:169, > from > /usr/lib/gcc/x86_64-redhat-linux/4.7.2/include/syslimits.h:7, > from > /usr/lib/gcc/x86_64-redhat-linux/4.7.2/include/limits.h:34, > from /usr/include/sys/param.h:26, > from ../include/lha_internal.h:44, > from strlcpy.c:1: > /usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE > requires compiling with optimization (-O) [-Werror=cpp] > cc1: all warnings being treated as errors > gmake[2]: *** [strlcpy.lo] Error 1 > gmake[2]: Leaving directory `/root/rpmbuild/BUILD/cluster-glue/replace' > <snip> > ----------------------------- > > > Regards, > Takatoshi MATSUO > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems
# HG changeset patch # User Dejan Muhamedagic <[email protected]> # Date 1370008983 -7200 # Node ID f3f3887b809e06fe9af0be610d5912a7a214cbb0 # Parent 27019ba6670df783a757d6993cbd504f0befaf25 build: do not add -O0 to CFLAGS indiscriminately diff -r 27019ba6670d -r f3f3887b809e configure.ac --- a/configure.ac Tue May 07 11:52:50 2013 +0900 +++ b/configure.ac Fri May 31 16:03:03 2013 +0200 @@ -1201,7 +1201,7 @@ if test "$GCC" != yes; then CFLAGS="$CFLAGS -g" enable_fatal_warnings=no else - CFLAGS="$CFLAGS -ggdb3 -O0" + CFLAGS="$CFLAGS -ggdb" # We had to eliminate -Wnested-externs because of libtool changes EXTRA_FLAGS="-fgnu89-inline # HG changeset patch # User Dejan Muhamedagic <[email protected]> # Date 1370361800 -7200 # Node ID b08704c19fb87a160a69b1cb04769862c0fce468 # Parent f3f3887b809e06fe9af0be610d5912a7a214cbb0 Dev: add format argument to suppress warnings diff -r f3f3887b809e -r b08704c19fb8 include/pils/plugin.h.in --- a/include/pils/plugin.h.in Fri May 31 16:03:03 2013 +0200 +++ b/include/pils/plugin.h.in Tue Jun 04 18:03:20 2013 +0200 @@ -396,7 +396,8 @@ typedef enum { PIL_INFO = 4, /* Informative message */ PIL_DEBUG= 5 /* Debug message */ }PILLogLevel; -typedef void (*PILLogFun)(PILLogLevel priority, const char * fmt, ...); +typedef void (*PILLogFun)(PILLogLevel priority, const char * fmt, ...) + G_GNUC_PRINTF(2,3); /* * The size glib2 type du jour? @@ -451,7 +452,8 @@ struct PILPluginImports_s { , const char * plugintype, const char * pluginname , void* plugin_private); - void (*log) (PILLogLevel priority, const char * fmt, ...); + void (*log) (PILLogLevel priority, const char * fmt, ...) + G_GNUC_PRINTF(2,3); gpointer (*alloc)(glib_size_t size); gpointer (*mrealloc)(gpointer space, glib_size_t size); void (*mfree)(gpointer space); @@ -482,7 +484,8 @@ void PilPluginUnivSetMemalloc(PILPluginU void PilPluginUnivSetLog(PILPluginUniv* -, void (*log) (PILLogLevel priority, const char * fmt, ...)); +, void (*log) (PILLogLevel priority, const char * fmt, ...) + G_GNUC_PRINTF(2,3)); /* Delete a plugin universe - shut the plugin loading system down */ diff -r f3f3887b809e -r b08704c19fb8 lib/pils/pils.c --- a/lib/pils/pils.c Fri May 31 16:03:03 2013 +0200 +++ b/lib/pils/pils.c Tue Jun 04 18:03:20 2013 +0200 @@ -223,7 +223,8 @@ PILRegisterInterface , void* ud_interface /* interface user data */ ); static PIL_rc PILunregister_interface(PILInterface* interfaceid); -static void PILLog(PILLogLevel priority, const char * fmt, ...); +static void PILLog(PILLogLevel priority, const char * fmt, ...) + __attribute__ ((format (printf, 2, 3))); /* @@ -309,7 +310,7 @@ NewPILPlugin( PILPluginType* pitype PILPlugin* ret = NEW(PILPlugin); if (DEBUGPLUGIN) { - PILLog(PIL_DEBUG, "NewPILPlugin(0x%x)", (unsigned long)ret); + PILLog(PIL_DEBUG, "NewPILPlugin(0x%lx)", (unsigned long)ret); } STATNEW(plugin); @@ -362,7 +363,7 @@ NewPILPluginType(PILPluginUniv* pluginun { PILPluginType* ret = NEW(PILPluginType); if (DEBUGPLUGIN) { - PILLog(PIL_DEBUG, "NewPILPlugintype(0x%x)", (unsigned long)ret); + PILLog(PIL_DEBUG, "NewPILPlugintype(0x%lx)", (unsigned long)ret); } STATNEW(pitype); @@ -463,7 +464,7 @@ NewPILPluginUniv(const char * baseplugin STATNEW(piuniv); if (DEBUGPLUGIN) { - PILLog(PIL_DEBUG, "NewPILPluginUniv(0x%x)" + PILLog(PIL_DEBUG, "NewPILPluginUniv(0x%lx)" , (unsigned long)ret); } if (!g_path_is_absolute(basepluginpath)) { @@ -796,7 +797,7 @@ NewPILInterface(PILInterfaceType* interf ret = NEW(PILInterface); STATNEW(interface); if (DEBUGPLUGIN) { - PILLog(PIL_DEBUG, "NewPILInterface(0x%x)", (unsigned long)ret); + PILLog(PIL_DEBUG, "NewPILInterface(0x%lx)", (unsigned long)ret); } if (ret) { @@ -813,7 +814,7 @@ NewPILInterface(PILInterfaceType* interf ret->if_close = closefun; ret->refcnt = 1; if (DEBUGPLUGIN) { - PILLog(PIL_DEBUG, "NewPILInterface(0x%lx:%s/%s)*** user_data: 0x%lx *******" + PILLog(PIL_DEBUG, "NewPILInterface(0x%lx:%s/%s)*** user_data: 0x%p *******" , (unsigned long)ret , interfacetype->typename , ret->interfacename @@ -1705,7 +1706,7 @@ NewPILInterfaceUniv(PILPluginUniv* piuni static int ltinityet = 0; if (DEBUGPLUGIN) { - PILLog(PIL_DEBUG, "NewPILInterfaceUniv(0x%x)" + PILLog(PIL_DEBUG, "NewPILInterfaceUniv(0x%lx)" , (unsigned long)ret); } if (!ltinityet) { @@ -1882,7 +1883,7 @@ so_select (const struct dirent *dire) if (DEBUGPLUGIN) { PILLog(PIL_DEBUG , "FILE %s Doesn't look like a plugin name [%s] " - "%d %d %s." + "%ld %zd %s." , dire->d_name, end , sizeof(obj_end), strlen(dire->d_name) , &dire->d_name[strlen(dire->d_name) # HG changeset patch # User Dejan Muhamedagic <[email protected]> # Date 1370363349 -7200 # Node ID 92ee2602ef888a45cafcab25fa0e708860740d91 # Parent b08704c19fb87a160a69b1cb04769862c0fce468 Dev: replace g_strdown with handmade strdown g_strdown is deprecated. g_ascii_strdown, the replacement, allocates memory for a new string, that would make code more complex (which is not necessary). This simple strdown version will work only on ASCII which is anyway our domain. diff -r b08704c19fb8 -r 92ee2602ef88 include/stonith/stonith.h --- a/include/stonith/stonith.h Tue Jun 04 18:03:20 2013 +0200 +++ b/include/stonith/stonith.h Tue Jun 04 18:29:09 2013 +0200 @@ -43,6 +43,7 @@ #ifndef __STONITH_H # define __STONITH_H #include <glib.h> +#include <ctype.h> #include <pils/plugin.h> #define STONITH_VERS 2 @@ -131,6 +132,7 @@ StonithNVpair* StonithNVpair* stonith_ghash_to_NVpair(GHashTable* stringtable); void free_NVpair(StonithNVpair*); /* Free result from above 2 functions */ +void strdown(char *str); /* simple replacement for g_strdown */ /* * The ST_DEVICEID info call is intended to return the type of the Stonith diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/apcmaster.c --- a/lib/plugins/stonith/apcmaster.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/apcmaster.c Tue Jun 04 18:29:09 2013 +0200 @@ -573,7 +573,7 @@ apcmaster_hostlist(StonithPlugin *s) if ((nm = (char*)STRDUP(sockname)) == NULL) { goto out_of_memory; } - g_strdown(nm); + strdown(nm); NameList[numnames] = nm; ++numnames; NameList[numnames] = NULL; diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/apcmastersnmp.c --- a/lib/plugins/stonith/apcmastersnmp.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/apcmastersnmp.c Tue Jun 04 18:29:09 2013 +0200 @@ -490,7 +490,7 @@ apcmastersnmp_hostlist(StonithPlugin * s hl = NULL; return (hl); } - g_strdown(hl[num_outlets]); + strdown(hl[num_outlets]); num_outlets++; } } diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/apcsmart.c --- a/lib/plugins/stonith/apcsmart.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/apcsmart.c Tue Jun 04 18:29:09 2013 +0200 @@ -664,7 +664,7 @@ apcsmart_set_config(StonithPlugin * s, S } for (ad->hostcount = 0; ad->hostlist[ad->hostcount] ; ad->hostcount++) { - g_strdown(ad->hostlist[ad->hostcount]); + strdown(ad->hostlist[ad->hostcount]); } if (access(ad->upsdev, R_OK|W_OK|F_OK) < 0) { LOG(PIL_CRIT,"Cannot access tty [%s]", ad->upsdev); diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/baytech.c --- a/lib/plugins/stonith/baytech.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/baytech.c Tue Jun 04 18:29:09 2013 +0200 @@ -633,7 +633,7 @@ baytech_hostlist(StonithPlugin *s) if ((nm = (char*)STRDUP(sockname)) == NULL) { goto out_of_memory; } - g_strdown(nm); + strdown(nm); NameList[numnames] = nm; ++numnames; NameList[numnames] = NULL; diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/bladehpi.c --- a/lib/plugins/stonith/bladehpi.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/bladehpi.c Tue Jun 04 18:29:09 2013 +0200 @@ -324,7 +324,7 @@ bladehpi_hostlist(StonithPlugin *s) ret = NULL; goto done; } - g_strdown(ret[j]); + strdown(ret[j]); } done: diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/cyclades.c --- a/lib/plugins/stonith/cyclades.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/cyclades.c Tue Jun 04 18:29:09 2013 +0200 @@ -341,7 +341,7 @@ cyclades_hostlist(StonithPlugin *s) if (!nm) { goto out_of_memory; } - g_strdown(nm); + strdown(nm); NameList[numnames] = nm; numnames++; NameList[numnames] = NULL; diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/drac3.c --- a/lib/plugins/stonith/drac3.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/drac3.c Tue Jun 04 18:29:09 2013 +0200 @@ -352,7 +352,7 @@ drac3_hostlist(StonithPlugin * s) if (hl == NULL) { LOG(PIL_CRIT, "%s: out of memory", __FUNCTION__); } else { - g_strdown(hl[0]); + strdown(hl[0]); } return(hl); diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/ibmhmc.c --- a/lib/plugins/stonith/ibmhmc.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/ibmhmc.c Tue Jun 04 18:29:09 2013 +0200 @@ -312,7 +312,7 @@ ibmhmc_hostlist(StonithPlugin *s) stonith_free_hostlist(ret); return NULL; } - g_strdown(ret[j]); + strdown(ret[j]); } return ret; } diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/ipmilan.c --- a/lib/plugins/stonith/ipmilan.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/ipmilan.c Tue Jun 04 18:29:09 2013 +0200 @@ -323,7 +323,7 @@ ipmilan_hostlist(StonithPlugin *s) ret = NULL; break; } - g_strdown(ret[j]); + strdown(ret[j]); } return(ret); diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/meatware.c --- a/lib/plugins/stonith/meatware.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/meatware.c Tue Jun 04 18:29:09 2013 +0200 @@ -157,7 +157,7 @@ Meat_parse_config_info(struct pluginDevi return S_OOPS; } for (nd->hostcount = 0; nd->hostlist[nd->hostcount]; nd->hostcount++) { - g_strdown(nd->hostlist[nd->hostcount]); + strdown(nd->hostlist[nd->hostcount]); } return(S_OK); } @@ -222,7 +222,7 @@ meatware_reset_req(StonithPlugin * s, in return S_RESETFAIL; } - g_strdown(resp_addr); + strdown(resp_addr); if (strncmp(resp_mw, "meatware", 8) || strncmp(resp_result, "reply", 5) || diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/null.c --- a/lib/plugins/stonith/null.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/null.c Tue Jun 04 18:29:09 2013 +0200 @@ -182,7 +182,7 @@ null_set_config(StonithPlugin* s, Stonit } for (nd->hostcount = 0; nd->hostlist[nd->hostcount] ; nd->hostcount++) { - g_strdown(nd->hostlist[nd->hostcount]); + strdown(nd->hostlist[nd->hostcount]); } return nd->hostcount ? S_OK : S_BADCONFIG; } diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/nw_rpc100s.c --- a/lib/plugins/stonith/nw_rpc100s.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/nw_rpc100s.c Tue Jun 04 18:29:09 2013 +0200 @@ -418,7 +418,7 @@ nw_rpc100s_hostlist(StonithPlugin *s) if (ret == NULL) { LOG(PIL_CRIT, "%s: out of memory", __FUNCTION__); } else { - g_strdown(ret[0]); + strdown(ret[0]); } return(ret); diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/rcd_serial.c --- a/lib/plugins/stonith/rcd_serial.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/rcd_serial.c Tue Jun 04 18:29:09 2013 +0200 @@ -467,7 +467,7 @@ rcd_serial_set_config(StonithPlugin* s, return S_OOPS; } rcd->hostlist[0] = namestocopy[0].s_value; - g_strdown(rcd->hostlist[0]); + strdown(rcd->hostlist[0]); rcd->hostlist[1] = NULL; rcd->hostcount = 1; rcd->device = namestocopy[1].s_value; diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/riloe.c --- a/lib/plugins/stonith/riloe.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/riloe.c Tue Jun 04 18:29:09 2013 +0200 @@ -164,7 +164,7 @@ RILOE_parse_config_info(struct pluginDev return S_OOPS; } for (nd->hostcount = 0; nd->hostlist[nd->hostcount]; nd->hostcount++) { - g_strdown(nd->hostlist[nd->hostcount]); + strdown(nd->hostlist[nd->hostcount]); } return(S_OK); } diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/rps10.c --- a/lib/plugins/stonith/rps10.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/rps10.c Tue Jun 04 18:29:09 2013 +0200 @@ -640,7 +640,7 @@ RPS_parse_config_info(struct pluginDevic } ctx->controllers[ctx->unit_count].node = STRDUP(node); - g_strdown(ctx->controllers[ctx->unit_count].node); + strdown(ctx->controllers[ctx->unit_count].node); ctx->controllers[ctx->unit_count].outlet_id = outlet_id; ctx->unit_count++; diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/ssh.c --- a/lib/plugins/stonith/ssh.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/ssh.c Tue Jun 04 18:29:09 2013 +0200 @@ -262,7 +262,7 @@ ssh_set_config(StonithPlugin* s, Stonith }else{ for (sd->hostcount = 0; sd->hostlist[sd->hostcount] ; sd->hostcount++) { - g_strdown(sd->hostlist[sd->hostcount]); + strdown(sd->hostlist[sd->hostcount]); } } diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/suicide.c --- a/lib/plugins/stonith/suicide.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/suicide.c Tue Jun 04 18:29:09 2013 +0200 @@ -139,7 +139,7 @@ suicide_hostlist(StonithPlugin *s) LOG(PIL_CRIT, "out of memory"); return ret; } - g_strdown(ret[0]); + strdown(ret[0]); return ret; } diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/vacm.c --- a/lib/plugins/stonith/vacm.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/vacm.c Tue Jun 04 18:29:09 2013 +0200 @@ -262,7 +262,7 @@ vacm_hostlist(StonithPlugin *s) stonith_free_hostlist(hlst); return NULL; } - g_strdown(hlst[hrcnt]); + strdown(hlst[hrcnt]); hrcnt++; } }else { diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/wti_mpc.c --- a/lib/plugins/stonith/wti_mpc.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/wti_mpc.c Tue Jun 04 18:29:09 2013 +0200 @@ -508,7 +508,7 @@ wti_mpc_hostlist(StonithPlugin * s) hl = NULL; return (hl); } - g_strdown(hl[num_outlets]); + strdown(hl[num_outlets]); num_outlets++; } } diff -r b08704c19fb8 -r 92ee2602ef88 lib/plugins/stonith/wti_nps.c --- a/lib/plugins/stonith/wti_nps.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/plugins/stonith/wti_nps.c Tue Jun 04 18:29:09 2013 +0200 @@ -538,7 +538,7 @@ wti_nps_hostlist(StonithPlugin *s) if ((nm = STRDUP(sockname)) == NULL) { goto out_of_memory; } - g_strdown(nm); + strdown(nm); NameList[numnames] = nm; ++numnames; NameList[numnames] = NULL; diff -r b08704c19fb8 -r 92ee2602ef88 lib/stonith/Makefile.am --- a/lib/stonith/Makefile.am Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/stonith/Makefile.am Tue Jun 04 18:29:09 2013 +0200 @@ -36,7 +36,7 @@ stonith_LDADD = libstonith.la $(top_bui stonith_LDFLAGS = @LIBADD_DL@ @LIBLTDL@ -export-dynamic @DLOPEN_FORCE_FLAGS@ @LIBADD_INTL@ meatclient_SOURCES = meatclient.c -meatclient_LDADD = $(GLIBLIB) +meatclient_LDADD = $(GLIBLIB) libstonith.la ## libraries diff -r b08704c19fb8 -r 92ee2602ef88 lib/stonith/expect.c --- a/lib/stonith/expect.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/stonith/expect.c Tue Jun 04 18:29:09 2013 +0200 @@ -414,7 +414,7 @@ StringToHostList(const char * s) memcpy(*hret, here, slen); /* Add EOS to result string */ (*hret)[slen] = EOS; - g_strdown(*hret); + strdown(*hret); here += slen; ++hret; } diff -r b08704c19fb8 -r 92ee2602ef88 lib/stonith/main.c --- a/lib/stonith/main.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/stonith/main.c Tue Jun 04 18:29:09 2013 +0200 @@ -717,7 +717,7 @@ main(int argc, char** argv) if (optind < argc) { char *nodename; nodename = g_strdup(argv[optind]); - g_strdown(nodename); + strdown(nodename); rc = stonith_req_reset(s, reset_type, nodename); g_free(nodename); } diff -r b08704c19fb8 -r 92ee2602ef88 lib/stonith/meatclient.c --- a/lib/stonith/meatclient.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/stonith/meatclient.c Tue Jun 04 18:29:09 2013 +0200 @@ -89,7 +89,7 @@ main(int argc, char** argv) usage(cmdname); } - g_strdown(opthost); + strdown(opthost); if (clearhost) { diff -r b08704c19fb8 -r 92ee2602ef88 lib/stonith/stonith.c --- a/lib/stonith/stonith.c Tue Jun 04 18:03:20 2013 +0200 +++ b/lib/stonith/stonith.c Tue Jun 04 18:29:09 2013 +0200 @@ -447,6 +447,16 @@ stonith_get_status(Stonith* s) return S_INVAL; } +void +strdown(char *str) +{ + while( *str ) { + if( isupper(*str) ) + *str = tolower(*str); + str++; + } +} + int stonith_req_reset(Stonith* s, int operation, const char* node) { @@ -457,7 +467,7 @@ stonith_req_reset(Stonith* s, int operat if (nodecopy == NULL) { return S_OOPS; } - g_strdown(nodecopy); + strdown(nodecopy); rc = sp->s_ops->req_reset(sp, operation, nodecopy); FREE(nodecopy); # HG changeset patch # User Dejan Muhamedagic <[email protected]> # Date 1370449441 -7200 # Node ID 3bc3b17eed6297c2523bc6ade96554ce5fe19554 # Parent 92ee2602ef888a45cafcab25fa0e708860740d91 Dev: initialize two formerly uninitialized variables NB: To the best of my knowledge, so far there were no bug reports about these. diff -r 92ee2602ef88 -r 3bc3b17eed62 lib/stonith/meatclient.c --- a/lib/stonith/meatclient.c Tue Jun 04 18:29:09 2013 +0200 +++ b/lib/stonith/meatclient.c Wed Jun 05 18:24:01 2013 +0200 @@ -60,7 +60,7 @@ main(int argc, char** argv) char * opthost = NULL; int clearhost = 0; - int c, argcount, waitmode; + int c, argcount, waitmode = 0; int errors = 0; if ((cmdname = strrchr(argv[0], '/')) == NULL) { diff -r 92ee2602ef88 -r 3bc3b17eed62 lrm/lrmd/lrmd.c --- a/lrm/lrmd/lrmd.c Tue Jun 04 18:29:09 2013 +0200 +++ b/lrm/lrmd/lrmd.c Wed Jun 05 18:24:01 2013 +0200 @@ -1429,7 +1429,7 @@ on_receive_cmd (IPC_Channel* ch, gpointe lrmd_client_t* client = NULL; struct ha_msg* msg = NULL; char *msg_s; - int ret; + int ret = FALSE; client = (lrmd_client_t*)user_data;
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
