More sonarlint work

This commit is contained in:
Jasmine Iwanek
2023-06-09 23:46:54 -04:00
parent 0d1d069af4
commit ee695e71f9
218 changed files with 6282 additions and 3845 deletions

View File

@@ -196,7 +196,6 @@ png_write_rgb(char *fn, uint8_t *pix, int16_t w, int16_t h, uint16_t pitch, PALE
png_bytep *rows;
png_color palette[256];
FILE *fp;
int i;
/* Create the image file. */
fp = plat_fopen(fn, "wb");
@@ -248,7 +247,7 @@ error:
PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
PNG_FILTER_TYPE_DEFAULT);
for (i = 0; i < 256; i++) {
for (uint16_t i = 0; i < 256; i++) {
palette[i].red = palcol[i].r;
palette[i].green = palcol[i].g;
palette[i].blue = palcol[i].b;
@@ -259,7 +258,7 @@ error:
/* Create a buffer for scanlines of pixels. */
rows = (png_bytep *) malloc(sizeof(png_bytep) * h);
for (i = 0; i < h; i++) {
for (int16_t i = 0; i < h; i++) {
/* Create a buffer for this scanline. */
rows[i] = (pix + (i * pitch));
}

View File

@@ -585,6 +585,6 @@ select_codepage(uint16_t code, uint16_t *curmap)
i++;
}
for (i = 0; i < 256; i++)
curmap[i] = map_to_use[i];
for (uint16_t j = 0; j < 256; j++)
curmap[j] = map_to_use[j];
}

View File

@@ -1462,7 +1462,7 @@ process_char(escp_t *dev, uint8_t ch)
dev->curr_x = dev->left_margin;
if (!dev->autofeed)
return 1;
/*FALLTHROUGH*/
[[fallthrough]];
case 0x0a: /* Line feed */
if (dev->font_style & STYLE_DOUBLEWIDTHONELINE) {

View File

@@ -58,8 +58,7 @@
#define POSTSCRIPT_BUFFER_LENGTH 65536
typedef struct
{
typedef struct ps_t {
const char *name;
void *lpt;

View File

@@ -283,7 +283,7 @@ process_char(prnt_t *dev, uint8_t ch)
dev->curr_x = 0;
if (!dev->autofeed)
return 1;
/*FALLTHROUGH*/
[[fallthrough]];
case 0x0a: /* Line feed */
dev->curr_x = 0;