bike-bean / Bike-Bean

Bike Bean Firmware
GNU General Public License v3.0
9 stars 0 forks source link

Fehler bei Update BB Firmware #4

Closed olafdimigen closed 3 years ago

olafdimigen commented 3 years ago

Erhalte folgende Fehler/Warnungen beim Hochladen der aktuellen Firmware (via Arduino IDE)

C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'void loop()':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:61:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:72:47: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
             memset(sendsmstextarray, NULL, 161);
                                               ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:121:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:124:39: warning: invalid conversion from 'char*' to 'char' [-fpermissive]
           *warningnumber = read_EEPROM(10);
                            ~~~~~~~~~~~^~~~
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:153:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:167:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:181:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:195:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:209:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:223:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:260:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:275:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:299:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
           memset(sendsmstextarray, NULL, 161);
                                             ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'char* GetUnread(int)':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:408:26: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(unread, NULL, 11);
                          ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'char* GetSMSText(int)':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:426:37: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(sendsmstextarray, NULL, 161);
                                     ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'char* readData(int)':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:492:36: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(dataarray, NULL, arraysize);
                                    ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'bool waitFor(const char*, int)':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:569:39: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(incomingByte, NULL, arraysize);
                                       ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'bool waitForWifi(const char*, int)':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:659:39: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(incomingByte, NULL, arraysize);
                                       ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'char* readwifiData(int)':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:690:36: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(dataarray, NULL, arraysize);
                                    ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'void GetWifis()':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:750:39: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
     memset(sendsmstextarray, NULL, 161);
                                       ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:770:32: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
       memset(smstext, NULL, 161);
                                ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:774:30: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
     memset(smstext, NULL, 161);
                              ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'void getLocationApp()':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:841:37: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(sendsmstextarray, NULL, 161);
                                     ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:869:31: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
      memset(smstext, NULL, 161);
                               ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'void GetWifisApp()':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:880:39: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
     memset(sendsmstextarray, NULL, 161);
                                       ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:905:41: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
       memset(sendsmstextarray, NULL, 161);
                                         ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:909:39: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
     memset(sendsmstextarray, NULL, 161);
                                       ^
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino: In function 'char* read_EEPROM(char)':
C:\Users\xxxxxxxxx\Downloads\Bike-Bean-master\Bike-Bean-master\Firmware\Firmware.ino:927:36: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   memset(dataarray, NULL, arraysize);
                                    ^
Der Sketch verwendet 12068 Bytes (39%) des Programmspeicherplatzes. Das Maximum sind 30720 Bytes.
Globale Variablen verwenden 1646 Bytes (80%) des dynamischen Speichers, 402 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes.
Wenig Arbeitsspeicher verfügbar, es können Stabilitätsprobleme auftreten.
jojo243 commented 3 years ago

Hallo @olafdimigen,

diese Fehlermeldungen/Warnings tauchen auch bei uns auf Linux-Systemen auf, die Arduino IDE ist hier offenbar strenger. Zwei Punkte sind hier m.E. zu nennen:

  1. Obwohl die Warnungen in "warnender", roter Schrift erscheinen, handelt es sich nur um Warnungen, nicht um Fehler, der Code funktioniert trotzdem, man kann ihn hochladen und der Funktion tut es keinen Abbruch
  2. Wenn man sich dennoch daran stört, ist es möglich, in den Zeilen, in denen die Warning auftaucht, das Wort NULL durch 0 zu ersetzen, das sollte die IDE Warnungen zufrieden stellen. Aus
    memset(dataarray, NULL, arraysize);

    würde dann

    memset(dataarray, 0, arraysize);

    werden. ABER das bitte nur in den Zeilen, in denen die Warning auftaucht.

Ich hoffe das hilft Ihnen & Viele Grüße

olafdimigen commented 3 years ago

Besten Dank für die Antwort.