1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 16:21:12 +00:00

Sign fixes

This commit is contained in:
Rosen Penev 2016-08-26 22:09:34 -07:00
parent c495f6a090
commit d666191d67
No known key found for this signature in database
GPG Key ID: 8B5A63249D3D4CE7
2 changed files with 24 additions and 24 deletions

View File

@ -113,9 +113,9 @@ const char *hm_NVML_nvmlErrorString (NVML_PTR *nvml, nvmlReturn_t nvml_rc)
nvmlReturn_t hm_NVML_nvmlInit (NVML_PTR *nvml) nvmlReturn_t hm_NVML_nvmlInit (NVML_PTR *nvml)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlInit (); nvmlReturn_t nvml_rc = (nvmlReturn_t)nvml->nvmlInit ();
if (nvml_rc != NVML_SUCCESS) if (nvml_rc != NVML_SUCCESS)
{ {
@ -129,9 +129,9 @@ nvmlReturn_t hm_NVML_nvmlInit (NVML_PTR *nvml)
nvmlReturn_t hm_NVML_nvmlShutdown (NVML_PTR *nvml) nvmlReturn_t hm_NVML_nvmlShutdown (NVML_PTR *nvml)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlShutdown (); nvmlReturn_t nvml_rc = (nvmlReturn_t)nvml->nvmlShutdown ();
if (nvml_rc != NVML_SUCCESS) if (nvml_rc != NVML_SUCCESS)
{ {
@ -145,7 +145,7 @@ nvmlReturn_t hm_NVML_nvmlShutdown (NVML_PTR *nvml)
nvmlReturn_t hm_NVML_nvmlDeviceGetName (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, char *name, unsigned int length) nvmlReturn_t hm_NVML_nvmlDeviceGetName (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, char *name, unsigned int length)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetName (device, name, length); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetName (device, name, length);
@ -164,7 +164,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetName (NVML_PTR *nvml, int skip_warnings, nvmlD
nvmlReturn_t hm_NVML_nvmlDeviceGetHandleByIndex (NVML_PTR *nvml, int skip_warnings, unsigned int index, nvmlDevice_t *device) nvmlReturn_t hm_NVML_nvmlDeviceGetHandleByIndex (NVML_PTR *nvml, int skip_warnings, unsigned int index, nvmlDevice_t *device)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetHandleByIndex (index, device); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetHandleByIndex (index, device);
@ -183,7 +183,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetHandleByIndex (NVML_PTR *nvml, int skip_warnin
nvmlReturn_t hm_NVML_nvmlDeviceGetTemperature (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp) nvmlReturn_t hm_NVML_nvmlDeviceGetTemperature (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetTemperature (device, sensorType, temp); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetTemperature (device, sensorType, temp);
@ -202,7 +202,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetTemperature (NVML_PTR *nvml, int skip_warnings
nvmlReturn_t hm_NVML_nvmlDeviceGetFanSpeed (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *speed) nvmlReturn_t hm_NVML_nvmlDeviceGetFanSpeed (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *speed)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetFanSpeed (device, speed); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetFanSpeed (device, speed);
@ -221,7 +221,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetFanSpeed (NVML_PTR *nvml, int skip_warnings, n
nvmlReturn_t hm_NVML_nvmlDeviceGetPowerUsage (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *power) nvmlReturn_t hm_NVML_nvmlDeviceGetPowerUsage (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *power)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetPowerUsage (device, power); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetPowerUsage (device, power);
@ -240,7 +240,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetPowerUsage (NVML_PTR *nvml, int skip_warnings,
nvmlReturn_t hm_NVML_nvmlDeviceGetUtilizationRates (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlUtilization_t *utilization) nvmlReturn_t hm_NVML_nvmlDeviceGetUtilizationRates (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlUtilization_t *utilization)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetUtilizationRates (device, utilization); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetUtilizationRates (device, utilization);
@ -259,7 +259,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetUtilizationRates (NVML_PTR *nvml, int skip_war
nvmlReturn_t hm_NVML_nvmlDeviceGetClockInfo (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlClockType_t type, unsigned int *clock) nvmlReturn_t hm_NVML_nvmlDeviceGetClockInfo (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlClockType_t type, unsigned int *clock)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetClockInfo (device, type, clock); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetClockInfo (device, type, clock);
@ -278,7 +278,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetClockInfo (NVML_PTR *nvml, int skip_warnings,
nvmlReturn_t hm_NVML_nvmlDeviceGetTemperatureThreshold (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int *temp) nvmlReturn_t hm_NVML_nvmlDeviceGetTemperatureThreshold (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int *temp)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetTemperatureThreshold (device, thresholdType, temp); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetTemperatureThreshold (device, thresholdType, temp);
@ -297,7 +297,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetTemperatureThreshold (NVML_PTR *nvml, int skip
nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkGeneration (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *currLinkGen) nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkGeneration (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *currLinkGen)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetCurrPcieLinkGeneration (device, currLinkGen); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetCurrPcieLinkGeneration (device, currLinkGen);
@ -316,7 +316,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkGeneration (NVML_PTR *nvml, int sk
nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkWidth (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *currLinkWidth) nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkWidth (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *currLinkWidth)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetCurrPcieLinkWidth (device, currLinkWidth); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetCurrPcieLinkWidth (device, currLinkWidth);
@ -335,7 +335,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkWidth (NVML_PTR *nvml, int skip_wa
nvmlReturn_t hm_NVML_nvmlDeviceGetCurrentClocksThrottleReasons (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned long long *clocksThrottleReasons) nvmlReturn_t hm_NVML_nvmlDeviceGetCurrentClocksThrottleReasons (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned long long *clocksThrottleReasons)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetCurrentClocksThrottleReasons (device, clocksThrottleReasons); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetCurrentClocksThrottleReasons (device, clocksThrottleReasons);
@ -354,7 +354,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetCurrentClocksThrottleReasons (NVML_PTR *nvml,
nvmlReturn_t hm_NVML_nvmlDeviceGetSupportedClocksThrottleReasons (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned long long *supportedClocksThrottleReasons) nvmlReturn_t hm_NVML_nvmlDeviceGetSupportedClocksThrottleReasons (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned long long *supportedClocksThrottleReasons)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetSupportedClocksThrottleReasons (device, supportedClocksThrottleReasons); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetSupportedClocksThrottleReasons (device, supportedClocksThrottleReasons);
@ -373,7 +373,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetSupportedClocksThrottleReasons (NVML_PTR *nvml
nvmlReturn_t hm_NVML_nvmlDeviceSetComputeMode (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlComputeMode_t mode) nvmlReturn_t hm_NVML_nvmlDeviceSetComputeMode (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlComputeMode_t mode)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceSetComputeMode (device, mode); nvmlReturn_t nvml_rc = nvml->nvmlDeviceSetComputeMode (device, mode);
@ -392,7 +392,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceSetComputeMode (NVML_PTR *nvml, int skip_warnings
nvmlReturn_t hm_NVML_nvmlDeviceSetGpuOperationMode (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlGpuOperationMode_t mode) nvmlReturn_t hm_NVML_nvmlDeviceSetGpuOperationMode (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, nvmlGpuOperationMode_t mode)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceSetGpuOperationMode (device, mode); nvmlReturn_t nvml_rc = nvml->nvmlDeviceSetGpuOperationMode (device, mode);
@ -411,7 +411,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceSetGpuOperationMode (NVML_PTR *nvml, int skip_war
nvmlReturn_t hm_NVML_nvmlDeviceGetPowerManagementLimitConstraints (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit) nvmlReturn_t hm_NVML_nvmlDeviceGetPowerManagementLimitConstraints (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetPowerManagementLimitConstraints (device, minLimit, maxLimit); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetPowerManagementLimitConstraints (device, minLimit, maxLimit);
@ -430,7 +430,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceGetPowerManagementLimitConstraints (NVML_PTR *nvm
nvmlReturn_t hm_NVML_nvmlDeviceSetPowerManagementLimit (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int limit) nvmlReturn_t hm_NVML_nvmlDeviceSetPowerManagementLimit (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int limit)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceSetPowerManagementLimit (device, limit); nvmlReturn_t nvml_rc = nvml->nvmlDeviceSetPowerManagementLimit (device, limit);
@ -449,7 +449,7 @@ nvmlReturn_t hm_NVML_nvmlDeviceSetPowerManagementLimit (NVML_PTR *nvml, int skip
nvmlReturn_t hm_NVML_nvmlDeviceGetPowerManagementLimit (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *limit) nvmlReturn_t hm_NVML_nvmlDeviceGetPowerManagementLimit (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *limit)
{ {
if (!nvml) return -1; if (!nvml) return -1u;
nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetPowerManagementLimit (device, limit); nvmlReturn_t nvml_rc = nvml->nvmlDeviceGetPowerManagementLimit (device, limit);

View File

@ -106,7 +106,7 @@ int log_final (FILE *fp, const char *fmt, va_list ap)
int max_len = (int) sizeof (s); int max_len = (int) sizeof (s);
int len = vsnprintf (s, max_len, fmt, ap); int len = vsnprintf (s, (size_t)max_len, fmt, ap);
if (len > max_len) len = max_len; if (len > max_len) len = max_len;
@ -3583,7 +3583,7 @@ void mp_add_cs_buf (uint *in_buf, size_t in_len, cs_t *css, int css_cnt)
{ {
uint u = in_buf[i] & 0xff; uint u = in_buf[i] & 0xff;
if (data.opts_type & OPTS_TYPE_PT_UPPER) u = toupper (u); if (data.opts_type & OPTS_TYPE_PT_UPPER) u = (uint) toupper (u);
if (css_uniq[u] == 1) continue; if (css_uniq[u] == 1) continue;
@ -5456,7 +5456,7 @@ void handle_left_request_lm (pot_t *pot, uint pot_cnt, char *input_buf, int inpu
// only show the hash part which is still not cracked // only show the hash part which is still not cracked
uint user_len = input_len - 32u; uint user_len = (uint)input_len - 32u;
char *hash_output = (char *) mymalloc (33); char *hash_output = (char *) mymalloc (33);