1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 22:58:30 +00:00

use const char for fopen mode

Fixes -Wwrite-strings warnings.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-07-18 12:27:21 -07:00
parent edab99cdfa
commit 14f5a26027
3 changed files with 5 additions and 5 deletions

View File

@ -15,8 +15,8 @@
int _wopen (const char *path, int oflag, ...);
#endif
bool hc_fopen (HCFILE *fp, const char *path, char *mode);
bool hc_fopen_raw (HCFILE *fp, const char *path, char *mode);
bool hc_fopen (HCFILE *fp, const char *path, const char *mode);
bool hc_fopen_raw (HCFILE *fp, const char *path, const char *mode);
int hc_fscanf (HCFILE *fp, const char *format, void *ptr);
int hc_fprintf (HCFILE *fp, const char *format, ...);
int hc_vfprintf (HCFILE *fp, const char *format, va_list ap);

View File

@ -1075,7 +1075,7 @@ typedef struct hc_fp
bool is_zip;
int bom_size;
char *mode;
const char *mode;
const char *path;
} HCFILE;

View File

@ -21,7 +21,7 @@ int _wopen (const char *path, int oflag, ...)
}
#endif
bool hc_fopen (HCFILE *fp, const char *path, char *mode)
bool hc_fopen (HCFILE *fp, const char *path, const char *mode)
{
if (path == NULL || mode == NULL) return false;
@ -130,7 +130,7 @@ bool hc_fopen (HCFILE *fp, const char *path, char *mode)
return true;
}
bool hc_fopen_raw (HCFILE *fp, const char *path, char *mode)
bool hc_fopen_raw (HCFILE *fp, const char *path, const char *mode)
{
if (path == NULL || mode == NULL) return false;