1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-04 08:23:50 +03:00

r12043: It's amazing the warnings you find when compiling on a 64-bit

box with gcc4 and -O6...
Fix a bunch of C99 dereferencing type-punned pointer will break
strict-aliasing rules errors. Also added prs_int32 (not uint32...)
as it's needed in one place. Find places where prs_uint32 was being
used to marshall/unmarshall a time_t (a big no no on 64-bits).
More warning fixes to come.
Thanks to Volker for nudging me to compile like this.
Jeremy.
This commit is contained in:
Jeremy Allison
2005-12-03 06:46:46 +00:00
committed by Gerald (Jerry) Carter
parent 47a9f2c3d6
commit c65b752604
19 changed files with 100 additions and 65 deletions

View File

@@ -1162,7 +1162,7 @@ uint32 ads_get_kvno(ADS_STRUCT *ads, const char *machine_name)
if (asprintf(&filter, "(samAccountName=%s$)", machine_name) == -1) {
return kvno;
}
ret = ads_search(ads, (void**) &res, filter, attrs);
ret = ads_search(ads, (void**)(void *)&res, filter, attrs);
SAFE_FREE(filter);
if (!ADS_ERR_OK(ret) && ads_count_replies(ads, res)) {
DEBUG(1,("ads_get_kvno: Computer Account For %s not found.\n", machine_name));
@@ -1216,7 +1216,7 @@ ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machin
ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
char *dn_string = NULL;
ret = ads_find_machine_acct(ads, (void **)&res, machine_name);
ret = ads_find_machine_acct(ads, (void **)(void *)&res, machine_name);
if (!ADS_ERR_OK(ret) || ads_count_replies(ads, res) != 1) {
DEBUG(5,("ads_clear_service_principal_names: WARNING: Host Account for %s not found... skipping operation.\n", machine_name));
DEBUG(5,("ads_clear_service_principal_names: WARNING: Service Principals for %s have NOT been cleared.\n", machine_name));
@@ -1284,7 +1284,7 @@ ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_n
char *dn_string = NULL;
const char *servicePrincipalName[4] = {NULL, NULL, NULL, NULL};
ret = ads_find_machine_acct(ads, (void **)&res, machine_name);
ret = ads_find_machine_acct(ads, (void **)(void *)&res, machine_name);
if (!ADS_ERR_OK(ret) || ads_count_replies(ads, res) != 1) {
DEBUG(1,("ads_add_service_principal_name: WARNING: Host Account for %s not found... skipping operation.\n",
machine_name));
@@ -1398,7 +1398,7 @@ static ADS_STATUS ads_add_machine_acct(ADS_STRUCT *ads, const char *machine_name
name_to_fqdn(my_fqdn, machine_name);
status = ads_find_machine_acct(ads, (void **)&res, machine_name);
status = ads_find_machine_acct(ads, (void **)(void *)&res, machine_name);
if (ADS_ERR_OK(status) && ads_count_replies(ads, res) == 1) {
char *dn_string = ads_get_dn(ads, res);
if (!dn_string) {
@@ -1771,7 +1771,7 @@ ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *machine_name,
return status;
}
status = ads_find_machine_acct(ads, (void **)&res, machine);
status = ads_find_machine_acct(ads, (void **)(void *)&res, machine);
if (!ADS_ERR_OK(status)) {
DEBUG(0, ("ads_join_realm: Host account test failed for machine %s\n", machine));
SAFE_FREE(machine);