[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Review needed: notecase



On Wed, 2005-04-06 at 21:56 -0400, Toshio wrote: 
> 
> I noticed several gcc warnings that I think can be fixed by changing
> int/unsigned int's into long/unsigned long's.  Too tired to test changes
> ATM, but some of them do look to need fixing in order to make notecase
> run correctly on 64 bit.

Patch to fix gcc warnings under AMD64.  Verified it runs on AMD_64 but
haven't put it through anything strenuous (network login.)

Let me know when you have another checkin to cvs that you need reviewed.

-Toshio
-- 

________S_________U_________B_________L_________I_________M_________E________
     t  o  s  h  i  o  @  t  i  k  i  -  l  o  u  n  g  e  .  c  o  m
                                                                GA->ME 1999
Index: notecase/src/gui/FileDialog.cpp
===================================================================
--- notecase.orig/src/gui/FileDialog.cpp
+++ notecase/src/gui/FileDialog.cpp
@@ -64,7 +64,7 @@ void FileDialog::AddFilter(const char *s
 	//we allow multiple wildcard patterns to be separated with | character
 	std::string strMulti(szPtrn);
 	std::string strPtrn;
-	unsigned int nPos = strMulti.find('|');
+	size_t nPos = strMulti.find('|');
 	while(nPos != std::string::npos)
 	{
 		strPtrn  = strMulti.substr(0, nPos);
Index: notecase/src/mru.cpp
===================================================================
--- notecase.orig/src/mru.cpp
+++ notecase/src/mru.cpp
@@ -134,7 +134,7 @@ void MRU::RebuildMenu()
 	GtkWidget *menu5 = gtk_menu_new ();
 	gtk_menu_item_set_submenu (GTK_MENU_ITEM (mru_menuitem), menu5);
 
-	unsigned int i;
+	unsigned long i;
 	for(i=0; i<m_lstFiles.size(); i++)
 	{
 		//append an item
Index: notecase/src/interface.cpp
===================================================================
--- notecase.orig/src/interface.cpp
+++ notecase/src/interface.cpp
@@ -786,7 +786,7 @@ on_MRU_activate                      (Gt
 									  gpointer         user_data)
 {
 	//pull file name from MRU list
-	int nIdx = (int)user_data;
+	unsigned long nIdx = (unsigned long)user_data;
 
 	if(nIdx < g_objMRU.GetFileCount())
 	{
Index: notecase/src/lib/FormatHtml.cpp
===================================================================
--- notecase.orig/src/lib/FormatHtml.cpp
+++ notecase/src/lib/FormatHtml.cpp
@@ -250,7 +250,7 @@ void replaceall(std::string &strData, co
 	{
 		int nDstSize = strlen(szReplace);
 
-		unsigned int nPos = strData.find(szFind);
+		size_t nPos = strData.find(szFind);
 		while(nPos != std::string::npos)
 		{
 			//strData.replace(nPos, nSrcSize, szReplace);

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]