Nux

Merge lp:~hikiko/nux/nux.static-analysis-errors into lp:nux

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Stephen M. Webb
Approved revision: 829
Merged at revision: 831
Proposed branch: lp:~hikiko/nux/nux.static-analysis-errors
Merge into: lp:nux
Diff against target: 145 lines (+21/-20)
6 files modified
Nux/Area.cpp (+4/-4)
NuxCore/Character/NUni.cpp (+2/-1)
NuxCore/Win32Dialogs/NWin32Clipboard.cpp (+2/-2)
NuxGraphics/FreetypeFont.cpp (+6/-6)
NuxGraphics/IOpenGLRectangleTexture.h (+1/-1)
examples/tooltip.cpp (+6/-6)
To merge this branch: bzr merge lp:~hikiko/nux/nux.static-analysis-errors
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Stephen M. Webb (community) Approve
Review via email: mp+194139@code.launchpad.net

Commit message

minor fixes (static analyzer errors and warnings)

Description of the change

minor fixes (static analyzer errors and warnings)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Stephen M. Webb (bregma) wrote :

These changes look fine.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/Area.cpp'
2--- Nux/Area.cpp 2013-10-30 18:47:52 +0000
3+++ Nux/Area.cpp 2013-11-06 13:39:20 +0000
4@@ -702,17 +702,17 @@
5
6 bool Area::IsArea() const
7 {
8- return this->Type().IsDerivedFromType(Area::StaticObjectType);;
9+ return this->Type().IsDerivedFromType(Area::StaticObjectType);
10 }
11
12 bool Area::IsInputArea() const
13 {
14- return this->Type().IsDerivedFromType(InputArea::StaticObjectType);;
15+ return this->Type().IsDerivedFromType(InputArea::StaticObjectType);
16 }
17
18 bool Area::IsView() const
19 {
20- return this->Type().IsDerivedFromType(View::StaticObjectType);;
21+ return this->Type().IsDerivedFromType(View::StaticObjectType);
22 }
23
24 bool Area::IsLayout() const
25@@ -727,7 +727,7 @@
26
27 bool Area::IsSpaceLayout() const
28 {
29- return this->Type().IsDerivedFromType(SpaceLayout::StaticObjectType);;
30+ return this->Type().IsDerivedFromType(SpaceLayout::StaticObjectType);
31 }
32
33 void Area::Set2DMatrix(const Matrix4 &mat)
34
35=== modified file 'NuxCore/Character/NUni.cpp'
36--- NuxCore/Character/NUni.cpp 2012-02-18 21:32:06 +0000
37+++ NuxCore/Character/NUni.cpp 2013-11-06 13:39:20 +0000
38@@ -499,6 +499,7 @@
39 return true;
40 }
41 }
42+ return true;
43 }
44
45 /**
46@@ -558,7 +559,7 @@
47 }
48 }
49
50-
51+ return true;
52 }
53
54
55
56=== modified file 'NuxCore/Win32Dialogs/NWin32Clipboard.cpp'
57--- NuxCore/Win32Dialogs/NWin32Clipboard.cpp 2012-10-10 22:46:50 +0000
58+++ NuxCore/Win32Dialogs/NWin32Clipboard.cpp 2013-11-06 13:39:20 +0000
59@@ -103,11 +103,11 @@
60 HGLOBAL GlobalMem = NULL;
61 BOOL IsUnicodeText = 0;
62
63- if ( GlobalMem = GetClipboardData ( CF_UNICODETEXT ) )
64+ if ( (GlobalMem = GetClipboardData ( CF_UNICODETEXT )) )
65 {
66 IsUnicodeText = 1;
67 }
68- else if ( GlobalMem = GetClipboardData ( CF_TEXT ) )
69+ else if ( (GlobalMem = GetClipboardData ( CF_TEXT )) )
70 {
71 IsUnicodeText = 0;
72 }
73
74=== modified file 'NuxGraphics/FreetypeFont.cpp'
75--- NuxGraphics/FreetypeFont.cpp 2012-12-06 14:58:54 +0000
76+++ NuxGraphics/FreetypeFont.cpp 2013-11-06 13:39:20 +0000
77@@ -124,7 +124,7 @@
78 set_current_font (face->family_name, face->style_name);
79
80 // check if the font is already loaded
81- if (find_font (face->family_name, face->style_name) )
82+ if (find_font ((const char*)face->family_name, (const char*)face->style_name) )
83 return true; // the font is already loaded
84
85 fs->charmap = new CharData[face->num_glyphs];
86@@ -783,8 +783,8 @@
87 unsigned int ascii_code = (unsigned int) text[n];
88 FT_Face face = get_font_family (current_font)->m_face;
89
90- int gltexid = get_font_style (face->family_name, face->style_name)->charmap[ascii_code].gltexid;
91- CharData cd = get_font_style (face->family_name, face->style_name)->charmap[ascii_code];
92+ int gltexid = get_font_style ((char*)face->family_name, (char*)face->style_name)->charmap[ascii_code].gltexid;
93+ CharData cd = get_font_style ((char*)face->family_name, (char*)face->style_name)->charmap[ascii_code];
94 glBindTexture (GL_TEXTURE_2D, gltexid);
95
96 glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
97@@ -915,9 +915,9 @@
98 const char *text = Str.c_str();
99 FT_Face face = get_font_family (current_font)->m_face;
100 unsigned int ascii_code = (unsigned int) text[strlen (text)-1];
101- CharData last_cd = get_font_style (face->family_name, face->style_name)->charmap[ascii_code];
102- CharData dot_cd = get_font_style (face->family_name, face->style_name)->charmap[trailingchar];
103- int dot_gltexid = get_font_style (face->family_name, face->style_name)->charmap[trailingchar].gltexid;
104+ CharData last_cd = get_font_style ((char*)face->family_name, (char*)face->style_name)->charmap[ascii_code];
105+ CharData dot_cd = get_font_style ((char*)face->family_name, (char*)face->style_name)->charmap[trailingchar];
106+ int dot_gltexid = get_font_style ((char*)face->family_name, (char*)face->style_name)->charmap[trailingchar].gltexid;
107
108 glEnable (GL_TEXTURE_2D);
109
110
111=== modified file 'NuxGraphics/IOpenGLRectangleTexture.h'
112--- NuxGraphics/IOpenGLRectangleTexture.h 2012-01-17 03:57:31 +0000
113+++ NuxGraphics/IOpenGLRectangleTexture.h 2013-11-06 13:39:20 +0000
114@@ -70,7 +70,7 @@
115 pDesc->Type = _ResourceType;
116 }
117
118- return OGL_OK;;
119+ return OGL_OK;
120 }
121
122 //! Return a pointer to a mipmap level data.
123
124=== modified file 'examples/tooltip.cpp'
125--- examples/tooltip.cpp 2011-09-20 06:03:43 +0000
126+++ examples/tooltip.cpp 2013-11-06 13:39:20 +0000
127@@ -454,12 +454,12 @@
128
129 // draw highlight
130 cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
131- hl_pattern = cairo_pattern_create_radial (hl_x,
132- hl_y,
133- 0.0f,
134- hl_x,
135- hl_y,
136- hl_size);
137+ hl_pattern = cairo_pattern_create_radial ((double)hl_x,
138+ (double)hl_y,
139+ (double)0.0f,
140+ (double)hl_x,
141+ (double)hl_y,
142+ (double)hl_size);
143 cairo_pattern_add_color_stop_rgba (hl_pattern,
144 0.0f,
145 1.0f,

Subscribers

People subscribed via source and target branches