Another round of sonarlint work
This commit is contained in:
@@ -92,13 +92,13 @@ png_log(const char *fmt, ...)
|
||||
#endif
|
||||
|
||||
static void
|
||||
error_handler(png_structp arg, const char *str)
|
||||
error_handler(UNUSED(png_structp arg), UNUSED(const char *str))
|
||||
{
|
||||
png_log("PNG: stream 0x%08lx error '%s'\n", arg, str);
|
||||
}
|
||||
|
||||
static void
|
||||
warning_handler(png_structp arg, const char *str)
|
||||
warning_handler(UNUSED(png_structp arg), UNUSED(const char *str))
|
||||
{
|
||||
png_log("PNG: stream 0x%08lx warning '%s'\n", arg, str);
|
||||
}
|
||||
|
||||
@@ -572,7 +572,7 @@ static const struct {
|
||||
void
|
||||
select_codepage(uint16_t code, uint16_t *curmap)
|
||||
{
|
||||
int i = 0;
|
||||
uint16_t i = 0;
|
||||
const uint16_t *map_to_use;
|
||||
|
||||
map_to_use = maps[0].map;
|
||||
|
||||
@@ -181,7 +181,7 @@ static dllimp_t ft_imports[] = {
|
||||
#define PIXX ((unsigned) floor(dev->curr_x * dev->dpi + 0.5))
|
||||
#define PIXY ((unsigned) floor(dev->curr_y * dev->dpi + 0.5))
|
||||
|
||||
typedef struct {
|
||||
typedef struct psurface_t {
|
||||
int8_t dirty; /* has the page been printed on? */
|
||||
char pad;
|
||||
|
||||
@@ -192,7 +192,7 @@ typedef struct {
|
||||
uint8_t *pixels; /* grayscale pixel data */
|
||||
} psurface_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct escp_t {
|
||||
const char *name;
|
||||
|
||||
void *lpt;
|
||||
@@ -204,12 +204,12 @@ typedef struct {
|
||||
uint8_t color;
|
||||
|
||||
/* page data (TODO: make configurable) */
|
||||
double page_width, /* all in inches */
|
||||
page_height,
|
||||
left_margin,
|
||||
top_margin,
|
||||
right_margin,
|
||||
bottom_margin;
|
||||
double page_width; /* all in inches */
|
||||
double page_height;
|
||||
double left_margin;
|
||||
double top_margin;
|
||||
double right_margin;
|
||||
double bottom_margin;
|
||||
uint16_t dpi;
|
||||
double cpi; /* defined chars per inch */
|
||||
double lpi; /* defined lines per inch */
|
||||
@@ -255,7 +255,8 @@ typedef struct {
|
||||
char fontpath[1024];
|
||||
char pagepath[1024];
|
||||
psurface_t *page;
|
||||
double curr_x, curr_y; /* print head position (inch) */
|
||||
double curr_x; /* print head position (x, inch) */
|
||||
double curr_y; /* print head position (y, inch) */
|
||||
uint16_t current_font;
|
||||
FT_Face fontface;
|
||||
int8_t lq_typeface;
|
||||
|
||||
@@ -236,9 +236,9 @@ timeout_timer(void *priv)
|
||||
}
|
||||
|
||||
static void
|
||||
ps_write_data(uint8_t val, void *p)
|
||||
ps_write_data(uint8_t val, void *priv)
|
||||
{
|
||||
ps_t *dev = (ps_t *) p;
|
||||
ps_t *dev = (ps_t *) priv;
|
||||
|
||||
if (dev == NULL)
|
||||
return;
|
||||
@@ -285,9 +285,9 @@ process_data(ps_t *dev)
|
||||
}
|
||||
|
||||
static void
|
||||
ps_write_ctrl(uint8_t val, void *p)
|
||||
ps_write_ctrl(uint8_t val, void *priv)
|
||||
{
|
||||
ps_t *dev = (ps_t *) p;
|
||||
ps_t *dev = (ps_t *) priv;
|
||||
|
||||
if (dev == NULL)
|
||||
return;
|
||||
@@ -317,9 +317,9 @@ ps_write_ctrl(uint8_t val, void *p)
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
ps_read_status(void *p)
|
||||
ps_read_status(void *priv)
|
||||
{
|
||||
ps_t *dev = (ps_t *) p;
|
||||
ps_t *dev = (ps_t *) priv;
|
||||
uint8_t ret = 0x9f;
|
||||
|
||||
if (!dev->ack)
|
||||
@@ -368,9 +368,9 @@ ps_init(void *lpt)
|
||||
}
|
||||
|
||||
static void
|
||||
ps_close(void *p)
|
||||
ps_close(void *priv)
|
||||
{
|
||||
ps_t *dev = (ps_t *) p;
|
||||
ps_t *dev = (ps_t *) priv;
|
||||
|
||||
if (dev == NULL)
|
||||
return;
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
#define PAGE_CPI 10.0 /* standard 10 cpi */
|
||||
#define PAGE_LPI 6.0 /* standard 6 lpi */
|
||||
|
||||
typedef struct {
|
||||
typedef struct psurface_t {
|
||||
int8_t dirty; /* has the page been printed on? */
|
||||
char pad;
|
||||
|
||||
@@ -91,7 +91,7 @@ typedef struct {
|
||||
char *chars; /* character data */
|
||||
} psurface_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct prnt_t {
|
||||
const char *name;
|
||||
|
||||
void *lpt;
|
||||
@@ -104,23 +104,23 @@ typedef struct {
|
||||
pc_timer_t timeout_timer;
|
||||
|
||||
/* page data (TODO: make configurable) */
|
||||
double page_width, /* all in inches */
|
||||
page_height,
|
||||
left_margin,
|
||||
top_margin,
|
||||
right_margin,
|
||||
bot_margin;
|
||||
double page_width; /* all in inches */
|
||||
double page_height;
|
||||
double left_margin;
|
||||
double top_margin;
|
||||
double right_margin;
|
||||
double bot_margin;
|
||||
|
||||
/* internal page data */
|
||||
psurface_t *page;
|
||||
uint8_t max_chars,
|
||||
max_lines;
|
||||
uint8_t curr_x, /* print head position (chars) */
|
||||
curr_y;
|
||||
uint8_t max_chars;
|
||||
uint8_t max_lines;
|
||||
uint8_t curr_x; /* print head position (x, chars) */
|
||||
uint8_t curr_y; /* print head position (y, chars) */
|
||||
|
||||
/* font data */
|
||||
double cpi, /* defined chars per inch */
|
||||
lpi; /* defined lines per inch */
|
||||
double cpi; /* defined chars per inch */
|
||||
double lpi; /* defined lines per inch */
|
||||
|
||||
/* handshake data */
|
||||
uint8_t data;
|
||||
|
||||
Reference in New Issue
Block a user