Skip to content

Commit ee291ba

Browse files
committed
compilation
1 parent b6b2e31 commit ee291ba

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

api/c/getpar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void sf_init(int argc,char *argv[])
8888
tprog = strrchr(argv[0],'/');
8989
tprog = (NULL == tprog)? argv[0]:tprog+1;
9090
prog_len = strlen(tprog)+1;
91-
strncpy(prog,tprog,prog_len);
91+
memcpy(prog,tprog,prog_len);
9292

9393
/* no pars and input from terminal */
9494
if (1==argc && !sf_stdin()) {
@@ -109,7 +109,7 @@ void sf_init(int argc,char *argv[])
109109
if (NULL == pass) {
110110
user[0] = '\0';
111111
} else {
112-
strncpy(user,pass->pw_name,USERNAME_MAX);
112+
memcpy(user,pass->pw_name,USERNAME_MAX);
113113
}
114114
}
115115

pens/genlib/genmarker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void genmarker (int npts, int type, int size, int *pvec)
5151
int savetxfont, savetxprec, savetxovly, savefat;
5252
struct s_txalign savealign;
5353
extern float fatmult_orig;
54-
char txbuf[12];
54+
char txbuf[20];
5555
char *txbuffer = txbuf;
5656

5757
savealign.hor = txalign.hor;
@@ -84,7 +84,7 @@ void genmarker (int npts, int type, int size, int *pvec)
8484
else
8585
if (type >= 127) /* special non-ASCII character */
8686
{
87-
sprintf (txbuffer, "\\v%d ", (int) type);
87+
snprintf (txbuffer, 20, "\\v%d ", (unsigned int) type);
8888
text_marker (txbuffer, size, npts, pvec);
8989
}
9090
else /* 0 through 5 are pre-defined; 6 through 20

pens/main/main_vplot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ int main (int argc, char* argv[])
243243
len = strlen(string);
244244
pltinname[infileno] = sf_charalloc(len+1);
245245

246-
strncpy( pltinname[infileno],string,len);
246+
memcpy( pltinname[infileno],string,len);
247247

248248
infileno++;
249249
}

system/generic/predicates.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2596,7 +2596,7 @@ REAL incircleadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL permanent)
25962596
REAL cxtaa[8], cxtbb[8], cytaa[8], cytbb[8];
25972597
int cxtaalen, cxtbblen, cytaalen, cytbblen;
25982598
REAL axtbc[8], aytbc[8], bxtca[8], bytca[8], cxtab[8], cytab[8];
2599-
int axtbclen=0, aytbclen=0, bxtcalen, bytcalen=0, cxtablen=0, cytablen=0;
2599+
int axtbclen=0, aytbclen=0, bxtcalen=0, bytcalen=0, cxtablen=0, cytablen=0;
26002600
REAL axtbct[16], aytbct[16], bxtcat[16], bytcat[16], cxtabt[16], cytabt[16];
26012601
int axtbctlen, aytbctlen, bxtcatlen, bytcatlen, cxtabtlen, cytabtlen;
26022602
REAL axtbctt[8], aytbctt[8], bxtcatt[8];

0 commit comments

Comments
 (0)