Skip to content

Commit

Permalink
Make cppcheck happier
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogtinator committed Jan 15, 2016
1 parent 063d944 commit 97c5888
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions core/lcd.c
Expand Up @@ -20,7 +20,7 @@ void lcd_draw_frame(uint8_t *buffer) {
}
int row;
for (row = 0; row < 230; ++row) {
uint32_t pal_shift = lcd.control & (1 << 8) ? 11 : 1;
uint32_t pal_shift = (lcd.control & (1 << 8)) ? 11 : 1;
int words = (320 / 32) * bpp;
uint8_t *out = buffer + (row * 160);
if (bpp < 16) {
Expand All @@ -41,14 +41,14 @@ void lcd_draw_frame(uint8_t *buffer) {
} while (bitpos != 0);
} while (--words != 0);
} else if (bpp == 16) {
uint32_t shift1 = pal_shift | (lcd.control & (1 << 9) ? 16 : 0);
uint32_t shift1 = pal_shift | ((lcd.control & (1 << 9)) ? 16 : 0);
uint32_t shift2 = shift1 ^ 16;
do {
uint32_t word = *in++;
*out++ = (word >> shift1 & 15) << 4 | (word >> shift2 & 15);
} while (--words != 0);
} else {
uint32_t shift = lcd.control & (1 << 8) ? 20 : 4;
uint32_t shift = (lcd.control & (1 << 8)) ? 20 : 4;
do {
int color1 = *in++ >> shift;
int color2 = *in++ >> shift & 15;
Expand Down
2 changes: 1 addition & 1 deletion core/os/os-win32.c
Expand Up @@ -95,7 +95,7 @@ void os_unmap_cow(void *addr, size_t size)
}

static int addr_cache_exception(PEXCEPTION_RECORD er, void *x, void *y, void *z) {
x = x; y = y; z = z; // unused parameters
(void) x; (void) y; (void) z;
if (er->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) {
if (addr_cache_pagefault((void *)er->ExceptionInformation[1]))
return 0; // Continue execution
Expand Down
2 changes: 1 addition & 1 deletion qtframebuffer.h
Expand Up @@ -6,7 +6,7 @@
class QMLFramebuffer : public QQuickPaintedItem
{
public:
QMLFramebuffer(QQuickItem *parent = 0);
explicit QMLFramebuffer(QQuickItem *parent = 0);
virtual void paint(QPainter *p) override;
};

Expand Down
2 changes: 1 addition & 1 deletion usblinktreewidget.h
Expand Up @@ -10,7 +10,7 @@ class USBLinkTreeWidget : public QTreeWidget
Q_OBJECT

public:
USBLinkTreeWidget(QWidget *parent = 0);
explicit USBLinkTreeWidget(QWidget *parent = 0);

// usblink callbacks
static void usblink_dirlist_callback_nested(struct usblink_file *file, bool is_error, void *data);
Expand Down

0 comments on commit 97c5888

Please sign in to comment.