Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· OpenAIAi2 WildChat-4.8M (AI2)

error: passing argument 1 of 'softapsetcustomconf' from incompatible pointer type…

  1. User

    error: passing argument 1 of 'softap_set_custom_conf' from incompatible pointer type [-Werror] softap_set_custom_conf(&isoftap_custom_config); typedef struct { //u8 a_gw_digit[3];

    u32 start_ip;	//ex:172.31.254.240
    u32 end_ip;	//ex:172.31.254.250
    u32 gw;	    //ex:172.31.254.250
    u32 subnet;	//ex:255.255.255.0
    
    s8 dfsignore;
    s8 max_sta_num;
    s8 encryt_mode;	
    s8 keylen;
    u8 key[64];
    u8 channel;
    s16 beacon_interval;
    
    s8 ssid_length;
    s8 ssid[32];
    s8 ssid_hidden;
    u8 dtim_peroid;
    

    } SOFTAP_CUSTOM_CONFIG;

    		SOFTAP_CUSTOM_CONFIG isoftap_custom_config;
    		
    		memset(&isoftap_custom_config, 0, sizeof(SOFTAP_CUSTOM_CONFIG));
    		
    		
    	//	isoftap_custom_config.a_gw_digit[0] = 192;
    //isoftap_custom_config.a_gw_digit[1] = 168;
    //isoftap_custom_config.a_gw_digit[2] = 4;
    		
    		
    		softap_set_custom_conf(&isoftap_custom_config);
    
  2. Assistant

    It seems like the function softap_set_custom_conf expects a pointer to a different type than &isoftap_custom_config. You should check the definition of the function and make sure that the argument you are passing matches its expected type.

    It's possible that you need to cast the argument to the correct type before passing it to the function. Alternatively, you could modify the definition of isoftap_custom_config to match the expected type of the function argument.

  3. User

    ответь на русском error: passing argument 1 of ‘softap_set_custom_conf’ from incompatible pointer type [-Werror] softap_set_custom_conf(&isoftap_custom_config); typedef struct { //u8 a_gw_digit[3];

    u32 start_ip; //ex:172.31.254.240 u32 end_ip; //ex:172.31.254.250 u32 gw; //ex:172.31.254.250 u32 subnet; //ex:255.255.255.0

    s8 dfsignore; s8 max_sta_num; s8 encryt_mode; s8 keylen; u8 key[64]; u8 channel; s16 beacon_interval;

    s8 ssid_length; s8 ssid[32]; s8 ssid_hidden; u8 dtim_peroid; } SOFTAP_CUSTOM_CONFIG;

    SOFTAP_CUSTOM_CONFIG isoftap_custom_config;

    memset(&isoftap_custom_config, 0, sizeof(SOFTAP_CUSTOM_CONFIG));

    // isoftap_custom_config.a_gw_digit[0] = 192; //isoftap_custom_config.a_gw_digit[1] = 168; //isoftap_custom_config.a_gw_digit[2] = 4;

    softap_set_custom_conf(&isoftap_custom_config);

  4. Assistant

    Возможно причина ошибки заключается в том, что функции softap_set_custom_conf() передается указатель на переменную типа, который отличается от ожидаемого типа параметра функции. Необходимо проверить, соответствует ли передаваемый аргумент ожидаемому типу в соответствии с определением функции.

    Также возможно потребуется выполнить явное приведение типов или изменить определение переменной isoftap_custom_config так, чтобы тип соответствовал ожидаемому типу параметра функции.

error: passing argument 1 of 'softapsetcustomconf' from… · The Chat Archive