Commit 409655f3 authored by Thiago Macieira's avatar Thiago Macieira Committed by The Qt Project
Browse files

Replace use of C-style cast with something that is not a cast.


Avoids a warning in user code. We should add -Wold-style-cast to our
header checks.

Task-number: QTBUG-32735
Change-Id: Ic284e3a5df56789d51484364b34a9ebc026bb20a
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
No related merge requests found
Showing with 3 additions and 3 deletions
...@@ -92,10 +92,10 @@ namespace QPatternist ...@@ -92,10 +92,10 @@ namespace QPatternist
}; };
void *pointer() const void *pointer() const
{ {
/* Constructing to qptrdiff means we avoid the warning "cast to pointer /* Constructing to qptrdiff means we avoid warnings.
* from integer of different size."
*/ */
return (void *)qptrdiff(data); char *null = 0;
return null + qptrdiff(data);
} }
Data additionalData; Data additionalData;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment