Package: boinc / 7.14.2+dfsg-3

some_extra_clang_warnings.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Description: fixing some clang warning.
 Probably this patch can be safely dropped since upstream seems to have already
 addressed this.
--- a/clientgui/sg_ProjectPanel.cpp
+++ b/clientgui/sg_ProjectPanel.cpp
@@ -426,8 +426,7 @@
     CMainDocument* pDoc = wxGetApp().GetDocument();
     ProjectSelectionData* selData;
     PROJECT* project;
-    char* ctrl_url;
-    int i, j, oldProjectSelection, newProjectSelection;
+    int oldProjectSelection, newProjectSelection;
 
     if ( pDoc->IsConnected() ) {
         int projCnt = pDoc->GetSimpleProjectCount();
@@ -435,10 +434,11 @@
         oldProjectSelection = m_ProjectSelectionCtrl->GetSelection();
         
         // If a new project has been added, figure out which one
-        for(i=0; i<projCnt; i++) {
+        for(int i=0; i<projCnt; i++) {
+            char* ctrl_url;
             project = pDoc->state.projects[i];
             bool found = false;
-            for(j=0; j<ctrlCount; j++) {
+            for(int j=0; j<ctrlCount; j++) {
                 ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
                 if (!strcmp(project->master_url, ctrl_url)) {
                     found = true;
@@ -450,7 +450,7 @@
             if ( !found ) {
                 wxString projname(project->project_name.c_str(), wxConvUTF8);
 #if SORTPROJECTLIST
-                int alphaOrder;
+                int alphaOrder,j;
                 for(j = 0; j < ctrlCount; ++j) {
                     alphaOrder = (m_ProjectSelectionCtrl->GetString(j)).CmpNoCase(projname);
                     if (alphaOrder > 0) {
@@ -482,8 +482,8 @@
         if ( projCnt < ctrlCount ) {
             project = NULL;
             // Check items in descending order so deletion won't change indexes of items yet to be checked
-            for(j=ctrlCount-1; j>=0; --j) {
-                ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
+            for(int j=ctrlCount-1; j>=0; --j) {
+                char* ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
                 project = pDoc->state.lookup_project(ctrl_url);
                 if ( project == NULL ) {
                     selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
@@ -511,9 +511,9 @@
     
         // Check to see if we need to reload the project icon
         ctrlCount = m_ProjectSelectionCtrl->GetCount();
-        for(j=0; j<ctrlCount; j++) {
+        for(int j=0; j<ctrlCount; j++) {
             selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
-            ctrl_url = selData->project_url;
+            char* ctrl_url = selData->project_url;
             project = pDoc->state.lookup_project(ctrl_url);
             if ( (project != NULL) && (project->project_files_downloaded_time > selData->project_files_downloaded_time) ) {
                 wxBitmap* projectBM = GetProjectSpecificBitmap(ctrl_url);