Skip to content
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
4 changes: 2 additions & 2 deletions display/d.graph/do_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int set_graph_stuff(void)
int set_text_size(void)
{
if (hsize >= 0. && vsize >= 0. && hsize <= 100. && vsize <= 100.) {
D_text_size(hsize * xincr, vsize * yincr);
D_text_size((double)hsize * xincr, (double)vsize * yincr);
G_debug(3, "text size initialized to [%.1f,%.1f]", hsize * xincr,
vsize * yincr);
}
Expand Down Expand Up @@ -201,7 +201,7 @@ int do_size(const char *str)
if (xper < 0. || yper < 0. || xper > 100. || yper > 100.)
return (-1);

D_text_size(xper * xincr, yper * yincr);
D_text_size((double)xper * xincr, (double)yper * yincr);
G_debug(3, "text size set to [%.1f,%.1f]", xper * xincr, yper * yincr);

return (0);
Expand Down
2 changes: 1 addition & 1 deletion display/d.legend/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ void draw(const char *map_name, int maptype, int color, int thin, int lines,
0.81)); /* ?? txsiz*.81=actual text width. */
if (ScaleFactor < 1.0) {
txsiz = txsiz * ScaleFactor;
dots_per_line = (int)floor(dots_per_line * ScaleFactor);
dots_per_line = (int)floor((double)dots_per_line * ScaleFactor);
}
}

Expand Down
2 changes: 1 addition & 1 deletion imagery/i.segment/flag.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FLAG *flag_create(int nrows, int ncols)
if (!new_flag->array)
G_fatal_error(_("Out of memory!"));

temp = (unsigned char *)G_malloc(nrows * new_flag->leng *
temp = (unsigned char *)G_malloc((size_t)nrows * new_flag->leng *
sizeof(unsigned char));

if (!temp)
Expand Down
6 changes: 3 additions & 3 deletions raster3d/r3.in.v5d/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ void convert(char *openFile, RASTER3D_Region *region, int convertNull,
res_r = v5d.ProjArgs[2];
res_c = v5d.ProjArgs[3];
res_l = v5d.VertArgs[1];
region->south = region->north - region->rows * res_r;
region->south = region->north - (double)region->rows * res_r;
region->west = v5d.ProjArgs[1];
region->east = region->west + region->cols * res_c;
region->east = region->west + (double)region->cols * res_c;
region->bottom = v5d.VertArgs[0];
region->top = region->bottom + region->depths * res_l;
region->top = region->bottom + (double)region->depths * res_l;

data1 = (float *)G_malloc(nrncnl * sizeof(float));
if (!data1)
Expand Down
2 changes: 1 addition & 1 deletion raster3d/r3.out.v5d/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void convert(char *fileout, int rows, int cols, int depths, int trueCoords)

/****************/

g = (float *)G_malloc(rows * cols * Nl[0] * sizeof(float));
g = (float *)G_malloc((size_t)rows * cols * Nl[0] * sizeof(float));
d1p = &d1;
f1p = (float *)&d1;
cnt = 0;
Expand Down
2 changes: 1 addition & 1 deletion vector/v.vol.rst/user3.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
c normalization
c
*/
offset1 = nsizr * nsizc;
offset1 = (off_t)nsizr * nsizc;

stepix = ew_res / dnorm;
stepiy = ns_res / dnorm;
Expand Down
4 changes: 2 additions & 2 deletions visualization/ximgview/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ static int try_get_colors(Colormap cmap, int nr, int ng, int nb)
int n_pixels;
int r, g, b;

xpixels = (unsigned long *)G_realloc(xpixels,
nr * ng * nb * sizeof(unsigned long));
xpixels = (unsigned long *)G_realloc(xpixels, (size_t)nr * ng * nb *
sizeof(unsigned long));
n_pixels = 0;

xcolor.flags = DoRed | DoGreen | DoBlue;
Expand Down
Loading