Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checks: Fix -Wunused-variable warnings #2651

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/gmath/la.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ mat_struct *G_matrix_scalar_mul(double scalar, mat_struct * matrix,
mat_struct * out)
{
int m, n, i, j;
int index = 0;

if (matrix == NULL) {
G_warning(_("Input matrix is uninitialized"));
Expand Down Expand Up @@ -968,7 +967,7 @@ vec_struct *G_matvect_product(mat_struct * A, vec_struct * b,

for (i = 0; i < m; i++) {
sum = 0.0;
int width = A->rows;
/* int width = A->rows; */

for (j = 0; j < n; j++) {

Expand Down Expand Up @@ -1602,7 +1601,7 @@ mat_struct *G_matrix_resize(mat_struct * in, int rows, int cols)
mat_struct *matrix;

matrix = G_matrix_init(rows, cols, rows);
int i, j, p, index = 0;
int i, j, p /*, index = 0 */ ;

for (i = 0; i < rows; i++)
for (j = 0; j < cols; j++)
Expand Down
3 changes: 2 additions & 1 deletion lib/vector/Vlib/write_pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ static int set_constraint_to_deferrable(struct Format_info_pg *, const char *,
const char *, const char *,
const char *, const char *);
static dbDriver *open_db(struct Format_info_pg *);
#endif

static struct line_pnts *Points;

#endif

/*!
\brief Writes feature on level 1 (PostGIS interface)

Expand Down
1 change: 0 additions & 1 deletion raster/r.spread/collect_ori.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ void collect_ori(int start_fd, int start_is_time)
extern CELL *cell;
extern CELL *map_base, *map_x_out, *map_y_out, *map_visit;
extern float *map_out;
extern char buf[];
extern float neg, zero;
extern int BARRIER;
extern int nrows, ncols;
Expand Down
2 changes: 1 addition & 1 deletion visualization/ximgview/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static void draw(void)
unsigned char b = *p++;
unsigned char g = *p++;
unsigned char r = *p++;
unsigned char a = *p++;
/* unsigned char a = */ (void)*p++;
unsigned long c = find_color(r, g, b);

XPutPixel(ximg, col, row, c);
Expand Down