mirror of
https://github.com/hashcat/hashcat.git
synced 2025-06-22 16:09:01 +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:
parent
edab99cdfa
commit
14f5a26027
@ -15,8 +15,8 @@
|
|||||||
int _wopen (const char *path, int oflag, ...);
|
int _wopen (const char *path, int oflag, ...);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool hc_fopen (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, 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_fscanf (HCFILE *fp, const char *format, void *ptr);
|
||||||
int hc_fprintf (HCFILE *fp, const char *format, ...);
|
int hc_fprintf (HCFILE *fp, const char *format, ...);
|
||||||
int hc_vfprintf (HCFILE *fp, const char *format, va_list ap);
|
int hc_vfprintf (HCFILE *fp, const char *format, va_list ap);
|
||||||
|
@ -1075,7 +1075,7 @@ typedef struct hc_fp
|
|||||||
bool is_zip;
|
bool is_zip;
|
||||||
int bom_size;
|
int bom_size;
|
||||||
|
|
||||||
char *mode;
|
const char *mode;
|
||||||
const char *path;
|
const char *path;
|
||||||
|
|
||||||
} HCFILE;
|
} HCFILE;
|
||||||
|
@ -21,7 +21,7 @@ int _wopen (const char *path, int oflag, ...)
|
|||||||
}
|
}
|
||||||
#endif
|
#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;
|
if (path == NULL || mode == NULL) return false;
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ bool hc_fopen (HCFILE *fp, const char *path, char *mode)
|
|||||||
return true;
|
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;
|
if (path == NULL || mode == NULL) return false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user