@@ -24,24 +24,24 @@ char * strcpy (char *dst, const char *src);
24
24
char * strcat (char * dst , const char * src );
25
25
26
26
char * strcpy (char * dst , const char * src ) {
27
- dst = dst ;
28
- src = src ;
27
+ ( void )( dst ) ;
28
+ ( void )( src ) ;
29
29
fprintf (stderr , "bsafe error: strcpy() is not safe, use bstrcpy instead.\n" );
30
30
if (bsafeShouldExit ) exit (-1 );
31
31
return NULL ;
32
32
}
33
33
34
34
char * strcat (char * dst , const char * src ) {
35
- dst = dst ;
36
- src = src ;
35
+ ( void )( dst ) ;
36
+ ( void )( src ) ;
37
37
fprintf (stderr , "bsafe error: strcat() is not safe, use bconcat instead.\n" );
38
38
if (bsafeShouldExit ) exit (-1 );
39
39
return NULL ;
40
40
}
41
41
42
42
#if !defined (__GNUC__ ) && (!defined(_MSC_VER ) || (_MSC_VER <= 1310 ))
43
43
char * (gets ) (char * buf ) {
44
- buf = buf ;
44
+ ( void )( buf ) ;
45
45
fprintf (stderr , "bsafe error: gets() is not safe, use bgets.\n" );
46
46
if (bsafeShouldExit ) exit (-1 );
47
47
return NULL ;
@@ -58,17 +58,17 @@ char * (gets) (char * buf) {
58
58
// }
59
59
60
60
char * (strncat ) (char * dst , const char * src , size_t n ) {
61
- dst = dst ;
62
- src = src ;
63
- n = n ;
61
+ ( void )( dst ) ;
62
+ ( void )( src ) ;
63
+ ( void )( n ) ;
64
64
fprintf (stderr , "bsafe error: strncat() is not safe, use bconcat then btrunc\n\tor cstr2tbstr, btrunc then bconcat instead.\n" );
65
65
if (bsafeShouldExit ) exit (-1 );
66
66
return NULL ;
67
67
}
68
68
69
69
char * (strtok ) (char * s1 , const char * s2 ) {
70
- s1 = s1 ;
71
- s2 = s2 ;
70
+ ( void )( s1 ) ;
71
+ ( void )( s2 ) ;
72
72
fprintf (stderr , "bsafe error: strtok() is not safe, use bsplit or bsplits instead.\n" );
73
73
if (bsafeShouldExit ) exit (-1 );
74
74
return NULL ;
0 commit comments