Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d7d166

Browse files
committed
C++: Remove whitespace at end of line
1 parent 6bdfebe commit 7d7d166

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.qhelp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ be unsigned. The following cases all fall into the first category.
2424
</p>
2525

2626
<p>
27-
Given <code>unsigned short n1, delta</code> and <code>n1 + delta &lt; n1</code>,
27+
Given <code>unsigned short n1, delta</code> and <code>n1 + delta &lt; n1</code>,
2828
it is possible to rewrite it as <code>(unsigned short)(n1 + delta)&nbsp;&lt;&nbsp;n1</code>.
2929
Note that <code>n1 + delta</code> does not actually overflow, due to <code>int</code> promotion.
3030
</p>
@@ -48,7 +48,7 @@ header has been included.
4848
In the following example, even though <code>delta</code> has been declared
4949
<code>unsigned short</code>, C/C++ type promotion rules require that its
5050
type is promoted to the larger type used in the addition and comparison,
51-
namely a <code>signed int</code>. Addition is performed on
51+
namely a <code>signed int</code>. Addition is performed on
5252
signed integers, and may have undefined behavior if an overflow occurs.
5353
As a result, the entire (comparison) expression may also have an undefined
5454
result.
@@ -67,10 +67,10 @@ are avoided.
6767
<sample src="SignedOverflowCheck-good1.cpp" />
6868
<p>
6969
In the following example, even though both <code>n</code> and <code>delta</code>
70-
have been declared <code>unsigned short</code>, both are promoted to
70+
have been declared <code>unsigned short</code>, both are promoted to
7171
<code>signed int</code> prior to addition. Because we started out with the
7272
narrower <code>short</code> type, the addition is guaranteed not to overflow
73-
and is therefore defined. But the fact that <code>n1 + delta</code> never
73+
and is therefore defined. But the fact that <code>n1 + delta</code> never
7474
overflows means that the condition <code>n1 + delta &lt; n1</code> will never
7575
hold true, which likely is not what the programmer intended. (see also the
7676
<code>cpp/bad-addition-overflow-check</code> query).

0 commit comments

Comments
 (0)