Compiling scetch

Hi I found on the net a code for a word clock that I would like to make but when I cmpile the code I get the message every time error: control reaches end of non-void function [-Werror=return-type]
This the code

/****************************************
 * Word clock
 * 
 * Fork of code from https://bitbucket.org/vdham/wordclock/
 * Dutch clockface
 * 
 *                                     +5V
 *                                      ^
 *               WEMOS D1 mini V2       |
 *              +-----------------+     |
 *  +-----------+3V3            5V+-----+------+ POS
 *  |           |                 |                  Power jack
 *  |           |              GND+-----+------+ NEG
 * +++          |                 |     |                        ^
 * | | LDR      |                 |     |                        |
 * | |          |                 |     v                       --- 1000uF
 * +++          |                 |    GND                      ---
 *  |           |                 |         +5V                  |
 * +++          |                 |          ^                   v
 * | | 1k8      |                 |          |  +--------------
 * | |          |                 |          +--+ +5V
 * +++          |                 |   +---+     |
 *  |           |                 +---+   +-----+ DIN   WS2812b LED strip
 *  +-----------+A0               |   +---+     |       95 LEDs
 *  |           +-----------------+          +--+ GND
 * +++                                       |  +--------------
 * | | 820                                   v
 * | |                                      GND
 * +++
 *  |
 *  v
 * GND
 * 
 * 
 */


#define FASTLED_ESP8266_RAW_PIN_ORDER
#define FASTLED_ALLOW_INTERRUPTS 0
#include "FastLED.h"
#include <FS.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
#include <TimeLib.h>
#include <ESP8266HTTPClient.h>
#include <vector>

// Use time or LDR light sensor for auto brightness adjustment.
//#define TIME_BRIGHTNESS
#define LDR_BRIGHTNESS

const char* OTApass     = "wordclock-OTA";

#define R_VALUE         0
#define G_VALUE         255
#define B_VALUE         0

#define MIN_BRIGHTNESS  65
#define MAX_BRIGHTNESS  255
#define BRIGHTNESS      255 // legacy, keep at 255
int     lastBrightness  =  MIN_BRIGHTNESS;
int     dayHour         = 8; // Start increasing brightness
int     nightHour       = 22; // Start decreasing brightness

#define SYNC_INTERVAL   1200

#define NUM_LEDS        95
#define DATA_PIN        4 // D2 Pin on Wemos mini

#define LDR_PIN         A0
#define LDR_DARK        10
#define LDR_LIGHT       200

const int   timeZone        = 1;     // Central European Time
bool        autoDST         = true;

IPAddress   timeServerIP; // time.nist.gov NTP server address
const char* ntpServerName   = "nl.pool.ntp.org";
const int   NTP_PACKET_SIZE = 48; // NTP time stamp is in the first 48 bytes of the message
byte        packetBuffer[ NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets
WiFiUDP     Udp;
unsigned int localPort = 8888;

time_t getNtpTime();
void sendNTPpacket(IPAddress &address);

unsigned long   lastdisplayupdate   = 0;

CRGB leds[NUM_LEDS];

uint8_t targetlevels[NUM_LEDS];
uint8_t currentlevels[NUM_LEDS];

void rainbow();
bool isDST(int d, int m, int y);
bool isDSTSwitchDay(int d, int m, int y);
void updateBrightness();
int timeBrightness();

void setup() {
    pinMode(LDR_PIN, INPUT);
    
    Serial.begin(115200);

    WiFiManager wifiManager;

    String ssid = "WordClock-" + String(ESP.getChipId());
    wifiManager.autoConnect(ssid.c_str());

    Serial.println("Connected!");
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());
    Serial.println("Starting UDP");
    Udp.begin(localPort);

    ArduinoOTA.setPassword(OTApass);

    ArduinoOTA.onStart([]() {
            Serial.println("Start");
            for(int i=0;i<NUM_LEDS;i++) {
                targetlevels[i] = 0;
                currentlevels[i] = 0;
                leds[i] = CRGB::Black;
            }
            leds[0] = CRGB::Red;
        
            FastLED.show();
            });
    ArduinoOTA.onEnd([]() {
            Serial.println("\nEnd");
            });
    ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
            Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
            });
    ArduinoOTA.onError([](ota_error_t error) {
            Serial.printf("Error[%u]: ", error);
            if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
            else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
            else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
            else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
            else if (error == OTA_END_ERROR) Serial.println("End Failed");
            ESP.restart();
            });
    ArduinoOTA.begin();

    
    LEDS.addLeds<NEOPIXEL,DATA_PIN>(leds,NUM_LEDS);
    LEDS.setBrightness(87);
    rainbow();
    LEDS.setBrightness(MIN_BRIGHTNESS);
    for(int i=0;i<NUM_LEDS;i++) {
        targetlevels[i] = 0;
        currentlevels[i] = 0;
        leds[i] = CRGB::Black;
    }

    FastLED.show();

    setSyncProvider(getNtpTime);
    setSyncInterval(SYNC_INTERVAL);
}

void rainbow() {
    uint8_t gHue = 0;
    while (gHue < 255) {
        EVERY_N_MILLISECONDS(20) {gHue++;}
        fill_rainbow(leds, NUM_LEDS, gHue, 1);
        FastLED.delay(1000/30); // 30FPS
    }
}

/*

   HET IS X UUR
   HET IS VIJF OVER X
   HET IS TIEN OVER X
   HET IS KWART OVER X
   HET IS TIEN VOOR HALF (X+1)
   HET IS VIJF VOOR HALF (X+1)
   HET IS HALF (X+1)
   HET IS VIJF OVER HALF (X+1)
   HET IS TIEN OVER HALF (X+1)
   HET IS KWART VOOR (X+1)
   HET IS TIEN VOOR (X+1)
   HET IS VIJF VOOR (X+1)
   HET IS (X+1) UUR
   ...
*/

#define HETIS 0
#define VIJF  13
#define TIEN  14
#define KWART 15
#define VOOR  16
#define OVER  17
#define HALF  18
#define UUR   19

std::vector<std::vector<int>> ledsbyword = {
    {84,85,86, 89,90}, // HET IS
    {4,5,6},            // een
    {47,48,49,50},      // twee
    {43,42,41,40},      // drie
    {23,22,21,20},      // vier
    {7,8,9,10},         // vijf
    {51,52,53},         // zes
    {25,26,27,28,29},   // zeven
    {44,45,46,47},      // acht
    {29,30,31,32,33},   // negen
    {37,36,35,34},      // tien
    {40,39,38},         // elf
    {19,18,17,16,15,14},// twaalf
    {82,81,80,79},    // VIJF
    {78,77,76,75},    // TIEN
    {64,65,66,67,68}, // KWART
    {63,62,61,60},    // VOOR
    {70,71,72,73},    // OVER
    {58,57,56,55},    // HALF
    {11,12,13}      // UUR
};

void loop() {
    // put your main code here, to run repeatedly:
    ArduinoOTA.handle();
    //  Serial.println("loop");
    Serial.print(analogRead(LDR_PIN));
    Serial.print(", ");
    Serial.println(lastBrightness);

    // only update clock every 50ms
    if(millis()-lastdisplayupdate > 50) {
        lastdisplayupdate = millis();
    }else{
        return;
    }

    #ifdef TIME_BRIGHTNESS
      LEDS.setBrightness(timeBrightness());
    #endif
    #ifdef LDR_BRIGHTNESS
      updateBrightness();
    #endif

    // if not connected, then show waiting animation
    if(timeStatus() == timeNotSet) {
        // show initialisation animation
        Serial.println("time not yet known");
        for(int i=0;i<NUM_LEDS;++i){ //blank rest
            leds[i] = CRGB::Black;
        }

        float phase = ((float)(millis()%2000)) / 1000;
        if(phase > 1) phase = 2.0f-phase;
        for(int i=0;i<4;++i){  // the scanner moves from 0 to(inc) 5, but only 1..4 are actually shown on the four leds
            float intensity = abs((float)(i-1)/3-phase);
            intensity = sqrt(intensity);
            leds[i] = CRGB(255-(255*intensity),0,0);
        }
        FastLED.show();
        return;
    }

    time_t t = now();

    // calculate target brightnesses:
    int current_hourword = hour();
    if(current_hourword>12) current_hourword = current_hourword - 12; // 12 hour clock, where 12 stays 12 and 13 becomes one
    if(current_hourword==0) current_hourword = 12;            // 0 is also called 12

    int next_hourword = hour()+1;
    if(next_hourword>12) next_hourword = next_hourword - 12;      // 12 hour clock, where 12 stays 12 and 13 becomes one
    if(next_hourword==0) next_hourword = 12;              // 0 is also called 12

    for(int i=0;i<NUM_LEDS;++i) {
        targetlevels[i] = 0;
    }

    for(int l : ledsbyword[HETIS]) { targetlevels[l] = 255; }
    switch((minute()%60)/5) {
        case 0:
            for(int l : ledsbyword[current_hourword])   { targetlevels[l] = 255; }
            for(int l : ledsbyword[UUR])        { targetlevels[l] = 255; }
            break;
        case 1:
            for(int l : ledsbyword[VIJF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[OVER])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[current_hourword]) { targetlevels[l] = 255; }
            break;
        case 2:
            for(int l : ledsbyword[TIEN])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[OVER])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[current_hourword])   { targetlevels[l] = 255; }
            break;
        case 3:
            for(int l : ledsbyword[KWART])        { targetlevels[l] = 255; }
            for(int l : ledsbyword[OVER])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[current_hourword])   { targetlevels[l] = 255; }
            break;
        case 4:
            for(int l : ledsbyword[TIEN])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[VOOR])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[HALF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
        case 5:
            for(int l : ledsbyword[VIJF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[VOOR])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[HALF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
        case 6:
            for(int l : ledsbyword[HALF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
        case 7:
            for(int l : ledsbyword[VIJF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[OVER])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[HALF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
        case 8:
            for(int l : ledsbyword[TIEN])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[OVER])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[HALF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
        case 9:
            for(int l : ledsbyword[KWART])        { targetlevels[l] = 255; }
            for(int l : ledsbyword[VOOR])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
        case 10:
            for(int l : ledsbyword[TIEN])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[VOOR])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
        case 11:
            for(int l : ledsbyword[VIJF])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[VOOR])         { targetlevels[l] = 255; }
            for(int l : ledsbyword[next_hourword])    { targetlevels[l] = 255; }
            break;
    }

    // the minute leds at the bottom:
    for(int i=4-(minute()%5);i<4;++i) {
        targetlevels[i] = 255;
    }

    int speed = 4;


    // move current brightness towards target brightness:
    for(int i=0;i<NUM_LEDS;++i) {
        if(currentlevels[i] < targetlevels[i]) {
            currentlevels[i] = std::min(BRIGHTNESS,currentlevels[i]+speed);
        }
        if(currentlevels[i] > targetlevels[i]) {
            currentlevels[i] = std::max(0,currentlevels[i]-speed);
        }

        // output the value to led: according to the function x^2/255 to compensate for the perceived brightness of leds which is not linear
        leds[i] = CRGB(
                currentlevels[i]*currentlevels[i]*R_VALUE/65025,
                currentlevels[i]*currentlevels[i]*G_VALUE/65025,
                currentlevels[i]*currentlevels[i]*B_VALUE/65025);
    }

    // Update LEDs
    FastLED.show();
}

/*-------- NTP code ----------*/

time_t getNtpTime()
{
    IPAddress ntpServerIP; // NTP server's ip address

    while (Udp.parsePacket() > 0) ; // discard any previously received packets
    Serial.println("Transmit NTP Request");
    // get a random server from the pool
    WiFi.hostByName(ntpServerName, ntpServerIP);
    Serial.print(ntpServerName);
    Serial.print(": ");
    Serial.println(ntpServerIP);
    sendNTPpacket(ntpServerIP);
    uint32_t beginWait = millis();
    while (millis() - beginWait < 1500) {
        int size = Udp.parsePacket();
        if (size >= NTP_PACKET_SIZE) {
            Serial.println("Receive NTP Response");
            Udp.read(packetBuffer, NTP_PACKET_SIZE);  // read packet into the buffer
            unsigned long secsSince1900;
            // convert four bytes starting at location 40 to a long integer
            secsSince1900 =  (unsigned long)packetBuffer[40] << 24;
            secsSince1900 |= (unsigned long)packetBuffer[41] << 16;
            secsSince1900 |= (unsigned long)packetBuffer[42] << 8;
            secsSince1900 |= (unsigned long)packetBuffer[43];
            // New time in seconds since Jan 1, 1970
            unsigned long newTime = secsSince1900 - 2208988800UL +
                timeZone * SECS_PER_HOUR;

            // Auto DST
            if (autoDST) {
                if (isDSTSwitchDay(day(newTime), month(newTime), year(newTime))) {
                    if (month(newTime) == 3 && hour(newTime) >= 2) {
                        newTime += SECS_PER_HOUR;
                    } else if (month(newTime) == 10 && hour(newTime) < 2) {
                        newTime += SECS_PER_HOUR;
                    }
                } else if (isDST(day(newTime), month(newTime), year(newTime))) {
                    newTime += SECS_PER_HOUR;
                }
            }

            setSyncInterval(SYNC_INTERVAL);
            return newTime;
        }
    }
    Serial.println("No NTP Response :-(");
    // Retry soon
    setSyncInterval(10);
    return 0; // return 0 if unable to get the time
}

// send an NTP request to the time server at the given address
void sendNTPpacket(IPAddress &address)
{
    // set all bytes in the buffer to 0
    memset(packetBuffer, 0, NTP_PACKET_SIZE);
    // Initialize values needed to form NTP request
    // (see URL above for details on the packets)
    packetBuffer[0] = 0b11100011;   // LI, Version, Mode
    packetBuffer[1] = 0;     // Stratum, or type of clock
    packetBuffer[2] = 6;     // Polling Interval
    packetBuffer[3] = 0xEC;  // Peer Clock Precision
    // 8 bytes of zero for Root Delay & Root Dispersion
    packetBuffer[12] = 49;
    packetBuffer[13] = 0x4E;
    packetBuffer[14] = 49;
    packetBuffer[15] = 52;
    // all NTP fields have been given values, now
    // you can send a packet requesting a timestamp:
    Udp.beginPacket(address, 123); //NTP requests are to port 123
    Udp.write(packetBuffer, NTP_PACKET_SIZE);
    Udp.endPacket();
}

// Check if Daylight saving time (DST) applies
// Northern Hemisphere - +1 hour between March and October
bool isDST(int d, int m, int y){
    bool dst = false;
    dst = (m > 3 && m < 10); // October-March

    if (m == 3){
        // Last sunday of March
        dst = (d >= ((31 - (5 * y /4 + 4) % 7)));
    }else if (m == 10){
        // Last sunday of October
        dst = (d < ((31 - (5 * y /4 + 1) % 7)));
    }

    return dst;
}

bool isDSTSwitchDay(int d, int m, int y){
    bool dst = false;
    if (m == 3){
        // Last sunday of March
        dst = (d == ((31 - (5 * y /4 + 4) % 7)));
    }else if (m == 10){
        // Last sunday of October
        dst = (d == ((31 - (5 * y /4 + 1) % 7)));
    }
    return dst;
}

int readAvgAnalog(int pin, byte numReadings, int readingDelay){
    int readingsTotal = 0;

    for (int i = 0; i < numReadings; i++) {
        readingsTotal += analogRead(pin);
        delay(readingDelay);
    }

    return readingsTotal / numReadings;
}

void updateBrightness(){
    int brightness = map(readAvgAnalog(LDR_PIN,50,2), LDR_DARK, LDR_LIGHT, MIN_BRIGHTNESS, MAX_BRIGHTNESS);
    brightness = constrain(brightness, MIN_BRIGHTNESS, MAX_BRIGHTNESS);

    // Smooth brightness change
    int difference = abs(brightness - lastBrightness);
    if (brightness > lastBrightness) {
        brightness = lastBrightness + (1 + 30 * difference / 189 );
    }else if (brightness < lastBrightness) {
        brightness = lastBrightness - (1 + 30 * difference / 189 );
    }

    lastBrightness = brightness;

    LEDS.setBrightness(brightness);
}

int timeBrightness() {
    if (hour() > dayHour && hour() < nightHour) {
        return MAX_BRIGHTNESS;
    } else if (hour() < dayHour || hour() > nightHour) {
        return MIN_BRIGHTNESS;
    } else if (hour() == dayHour) {
        return constrain(
                map(minute(), 0, 29, MIN_BRIGHTNESS, MAX_BRIGHTNESS),
                MIN_BRIGHTNESS, MAX_BRIGHTNESS);
    } else if (hour() == nightHour) {
        return constrain(
                map(minute(), 0, 29, MAX_BRIGHTNESS, MIN_BRIGHTNESS),
                MIN_BRIGHTNESS, MAX_BRIGHTNESS);
    }
}

hope someone can help me

Please post the full error message

It sounds like you have a function that promises to return a value but does not do it.

This is probably the source of the error.

1 Like

Hi UKHeliBob thanks for the quick response this is the error code

typ of plArduino:1.8.19 (Windows 10), Board:"LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"





















In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:50,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:61:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   61 |  inline void hi(register port_ptr_t port) __attribute__ ((always_inline)) { *port |= mPinMask; }

      |                                     ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:62:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   62 |  inline void lo(register port_ptr_t port) __attribute__ ((always_inline)) { *port &= ~mPinMask; }

      |                                     ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:63:34: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   63 |  inline void set(register port_t val) __attribute__ ((always_inline)) { *mPort = val; }

      |                                  ^~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:65:42: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   65 |  inline void fastset(register port_ptr_t port, register port_t val) __attribute__ ((always_inline)) { *port  = val; }

      |                                          ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:65:64: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   65 |  inline void fastset(register port_ptr_t port, register port_t val) __attribute__ ((always_inline)) { *port  = val; }

      |                                                                ^~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:228:44: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  228 |  inline static void hi(register port_ptr_t port) __attribute__ ((always_inline)) { }

      |                                            ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:229:44: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  229 |  inline static void lo(register port_ptr_t port) __attribute__ ((always_inline)) { }

      |                                            ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:230:41: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  230 |  inline static void set(register port_t val) __attribute__ ((always_inline)) { }

      |                                         ^~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:232:49: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  232 |  inline static void fastset(register port_ptr_t port, register port_t val) __attribute__ ((always_inline)) { }

      |                                                 ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastpin.h:232:71: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  232 |  inline static void fastset(register port_ptr_t port, register port_t val) __attribute__ ((always_inline)) { }

      |                                                                       ^~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:51,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_types.h:22:82: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   22 |     static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data) { return data; }

      |                                                                                  ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_types.h:23:82: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   23 |     static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data, register uint8_t scale) { return scale8(data, scale); }

      |                                                                                  ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_types.h:23:105: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   23 |     static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data, register uint8_t scale) { return scale8(data, scale); }

      |                                                                                                         ^~~~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:3,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastpin_esp8266.h:24:44: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   24 |     inline static void set(register port_t val) __attribute__ ((always_inline)) { if(PIN < 16) { _GPB._GPO = val; } else { GP16O = val; }}

      |                                            ^~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:3,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastpin_esp8266.h:30:47: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   30 |     inline static void hi(register port_ptr_t port) __attribute__ ((always_inline)) { hi(); }

      |                                               ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastpin_esp8266.h:31:47: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   31 |     inline static void lo(register port_ptr_t port) __attribute__ ((always_inline)) { lo(); }

      |                                               ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastpin_esp8266.h:32:52: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   32 |     inline static void fastset(register port_ptr_t port, register port_t val) __attribute__ ((always_inline)) { *port = val; }

      |                                                    ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastpin_esp8266.h:32:74: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   32 |     inline static void fastset(register port_ptr_t port, register port_t val) __attribute__ ((always_inline)) { *port = val; }

      |                                                                          ^~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:4,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:53:102: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   53 |  template<int BITS> __attribute__ ((always_inline)) inline static bool writeBits(register uint32_t & last_mark, register uint32_t b)  {

      |                                                                                                      ^~~~~~~~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:4,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:53:131: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   53 |  template<int BITS> __attribute__ ((always_inline)) inline static bool writeBits(register uint32_t & last_mark, register uint32_t b)  {

      |                                                                                                                                   ^

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h: In static member function 'static bool ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::writeBits(uint32_t&, uint32_t)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:55:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   55 |     for(register uint32_t i = BITS; i > 0; --i) {

      |                           ^

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h: In static member function 'static uint32_t ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:83:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   83 |   register uint32_t b = pixels.loadAndScale0();

      |                     ^

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:5,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h: At global scope:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h:73:111: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   73 |    template<int BITS,int PX> __attribute__ ((always_inline)) inline static void writeBits(register uint32_t & last_mark, register Lines & b, PixelController<RGB_ORDER, LANES, PORT_MASK> &pixels) { // , register uint32_t & b2)  {

      |                                                                                                               ^~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h:73:139: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   73 |    template<int BITS,int PX> __attribute__ ((always_inline)) inline static void writeBits(register uint32_t & last_mark, register Lines & b, PixelController<RGB_ORDER, LANES, PORT_MASK> &pixels) { // , register uint32_t & b2)  {

      |                                                                                                                                           ^

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h: In static member function 'static void InlineBlockClocklessController<LANES, FIRST_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::writeBits(uint32_t&, InlineBlockClocklessController<LANES, FIRST_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::Lines&, PixelController<RGB_ORDER, LANES, (((1 << ((LANES < 6) ? LANES : 6)) - 1) & 65535)>&)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h:77:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   77 |   register uint8_t d = pixels.template getd<PX>(pixels);

      |                    ^

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h:78:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   78 |   register uint8_t scale = pixels.template getscale<PX>(pixels);

      |                    ^~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h:80:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   80 |   for(register uint32_t i = 0; i < USED_LANES; ++i) {

      |                         ^

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_block_esp8266.h:95:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   95 |   for(register uint32_t i = USED_LANES; i < 8; ++i) {

      |                         ^

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi.h:9,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:67,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h: At global scope:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:262:55: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  262 |  template <class D> void writeBytes(register uint8_t *data, int len) {

      |                                                       ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:307:36: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  307 |  void writeBytes(register uint8_t *data, int len) { writeBytes<DATA_NOP>(data, len); }

      |                                    ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h: In static member function 'static void AVRSoftwareSPIOutput<DATA_PIN, CLOCK_PIN, SPI_SPEED>::writeBytesValueRaw(uint8_t, int)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:232:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  232 |   register data_ptr_t datapin = FastPin<DATA_PIN>::port();

      |                       ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:237:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  237 |    register clock_ptr_t clockpin = FastPin<CLOCK_PIN>::port();

      |                         ^~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:238:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  238 |    register data_t datahi = FastPin<DATA_PIN>::hival();

      |                    ^~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:239:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  239 |    register data_t datalo = FastPin<DATA_PIN>::loval();

      |                    ^~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:240:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  240 |    register clock_t clockhi = FastPin<CLOCK_PIN>::hival();

      |                     ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:241:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  241 |    register clock_t clocklo = FastPin<CLOCK_PIN>::loval();

      |                     ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:248:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  248 |    register data_t datahi_clockhi = FastPin<DATA_PIN>::hival() | FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:249:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  249 |    register data_t datalo_clockhi = FastPin<DATA_PIN>::loval() | FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:250:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  250 |    register data_t datahi_clocklo = FastPin<DATA_PIN>::hival() & ~FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:251:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  251 |    register data_t datalo_clocklo = FastPin<DATA_PIN>::loval() & ~FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h: In member function 'void AVRSoftwareSPIOutput<DATA_PIN, CLOCK_PIN, SPI_SPEED>::writeBytes(uint8_t*, int)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:270:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  270 |   register clock_ptr_t clockpin = FastPin<CLOCK_PIN>::port();

      |                        ^~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:271:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  271 |   register data_ptr_t datapin = FastPin<DATA_PIN>::port();

      |                       ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:276:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  276 |    register data_t datahi = FastPin<DATA_PIN>::hival();

      |                    ^~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:277:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  277 |    register data_t datalo = FastPin<DATA_PIN>::loval();

      |                    ^~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:278:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  278 |    register clock_t clockhi = FastPin<CLOCK_PIN>::hival();

      |                     ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:279:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  279 |    register clock_t clocklo = FastPin<CLOCK_PIN>::loval();

      |                     ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:289:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  289 |    register data_t datahi_clockhi = FastPin<DATA_PIN>::hival() | FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:290:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  290 |    register data_t datalo_clockhi = FastPin<DATA_PIN>::loval() | FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:291:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  291 |    register data_t datahi_clocklo = FastPin<DATA_PIN>::hival() & ~FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:292:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  292 |    register data_t datalo_clocklo = FastPin<DATA_PIN>::loval() & ~FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h: In member function 'void AVRSoftwareSPIOutput<DATA_PIN, CLOCK_PIN, SPI_SPEED>::writePixels(PixelController<RGB_ORDER>)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:333:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  333 |   register data_ptr_t datapin = FastPin<DATA_PIN>::port();

      |                       ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:336:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  336 |    register clock_ptr_t clockpin = FastPin<CLOCK_PIN>::port();

      |                         ^~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:339:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  339 |    register data_t datahi = FastPin<DATA_PIN>::hival();

      |                    ^~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:340:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  340 |    register data_t datalo = FastPin<DATA_PIN>::loval();

      |                    ^~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:341:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  341 |    register clock_t clockhi = FastPin<CLOCK_PIN>::hival();

      |                     ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:342:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  342 |    register clock_t clocklo = FastPin<CLOCK_PIN>::loval();

      |                     ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:357:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  357 |    register data_t datahi_clockhi = FastPin<DATA_PIN>::hival() | FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:358:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  358 |    register data_t datalo_clockhi = FastPin<DATA_PIN>::loval() | FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:359:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  359 |    register data_t datahi_clocklo = FastPin<DATA_PIN>::hival() & ~FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi_bitbang.h:360:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  360 |    register data_t datalo_clocklo = FastPin<DATA_PIN>::loval() & ~FastPin<CLOCK_PIN>::mask();

      |                    ^~~~~~~~~~~~~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:67,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi.h: At global scope:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/fastspi.h:145:23: note: '#pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output'

  145 | #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"

      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:68,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/chipsets.h:88:80: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   88 |   __attribute__((always_inline)) inline static uint8_t adjust(register uint8_t data) { return ((data>>1) | 0x80) + ((data && (data<254)) & 0x01); }

      |                                                                                ^~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/chipsets.h: In member function 'virtual void LPD6803Controller<DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED>::showPixels(PixelController<RGB_ORDER>&)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/chipsets.h:175:31: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  175 |             register uint16_t command;

      |                               ^~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/chipsets.h: In member function 'void P9813Controller<DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED>::writeLed(uint8_t, uint8_t, uint8_t)':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/chipsets.h:349:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

  349 |   register uint8_t top = 0xC0 | ((~b & 0xC0) >> 2) | ((~g & 0xC0) >> 4) | ((~r & 0xC0) >> 6);

      |                    ^~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:4,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h: In instantiation of 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85]':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:38:15:   required from here

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:41:27: warning: 'static uint32_t ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85; uint32_t = unsigned int]' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]

   41 |     while((showRGBInternal(pixels)==0) && cnt--) {

      |            ~~~~~~~~~~~~~~~^~~~~~~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:4,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:80:34: note: declared here

   80 |  static uint32_t ICACHE_RAM_ATTR showRGBInternal(PixelController<RGB_ORDER> pixels) {

      |                                  ^~~~~~~~~~~~~~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:4,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:41:27: warning: 'static uint32_t ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85; uint32_t = unsigned int]' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]

   41 |     while((showRGBInternal(pixels)==0) && cnt--) {

      |            ~~~~~~~~~~~~~~~^~~~~~~~

In file included from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/fastled_esp8266.h:4,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms.h:34,

                 from C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/FastLED.h:54,

                 from C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino:40:

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:80:34: note: declared here

   80 |  static uint32_t ICACHE_RAM_ATTR showRGBInternal(PixelController<RGB_ORDER> pixels) {

      |                                  ^~~~~~~~~~~~~~~

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h: In instantiation of 'static uint32_t ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85; uint32_t = unsigned int]':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:41:27:   required from 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85]'

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:38:15:   required from here

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:83:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   83 |   register uint32_t b = pixels.loadAndScale0();

      |                     ^

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h: In instantiation of 'static bool ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::writeBits(uint32_t&, uint32_t) [with int BITS = 8; int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85; uint32_t = unsigned int]':

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:113:27:   required from 'static uint32_t ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85; uint32_t = unsigned int]'

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:41:27:   required from 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with int DATA_PIN = 4; int T1 = 20; int T2 = 50; int T3 = 30; EOrder RGB_ORDER = GRB; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 85]'

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:38:15:   required from here

C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0\src/platforms/esp/8266/clockless_esp8266.h:55:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

   55 |     for(register uint32_t i = BITS; i > 0; --i) {

      |                           ^

C:\Users\sefwe\Documents\Arduino\Woord_klok2\Woord_klok2.ino: In function 'int timeBrightness()':

Woord_klok2:523:1: error: control reaches end of non-void function [-Werror=return-type]

  523 | }

      | ^

cc1plus.exe: some warnings being treated as errors

Meerdere bibliotheken gevonden voor "FastLED.h"

Gebruikt: C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.5.0

Niet gebruikt: C:\Users\sefwe\Documents\Arduino\libraries\FastLED-3.3.3

exit status 1

control reaches end of non-void function [-Werror=return-type]



Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
optie aan in Bestand -> Voorkeuren.
ak hier code

Thanks for the quick response but how can I fix this I'm not that good at programming arduino yet

We were all there. Well, it seems that a few of us were born writing code....

Copy the error message to a file (there's a button for that).
Search for "error"
The message tells you exactly where the error was detected.

Woord_klok2:523:1: error: control reaches end of non-void function [-Werror=return-type]
  523 | }
      | ^

Now go to the code and look at line 523, column 1

A function that has a declared a non-void return type, int in this case, must return something.

Since the return statements in your if() statements terminate the function, fixing this would be pretty easy. If your code execution gets to the last closing brace }, then none of the return statements were executed, so return a value you can test or use in your main code. For example, adding one line at the end will fix your compile error and default the function to MIN_BRIGHTNESS.

int timeBrightness() {
    if (hour() > dayHour && hour() < nightHour) {
        return MAX_BRIGHTNESS;
    } else if (hour() < dayHour || hour() > nightHour) {
        return MIN_BRIGHTNESS;
    } else if (hour() == dayHour) {
        return constrain(
                map(minute(), 0, 29, MIN_BRIGHTNESS, MAX_BRIGHTNESS),
                MIN_BRIGHTNESS, MAX_BRIGHTNESS);
    } else if (hour() == nightHour) {
        return constrain(
                map(minute(), 0, 29, MAX_BRIGHTNESS, MIN_BRIGHTNESS),
                MIN_BRIGHTNESS, MAX_BRIGHTNESS);
    }
    return MIN_BRIGHTNESS;
}

You also have a lot of warnings in the error text. FOR NOW, ignore them. The code will compile and run. As you gain programming experience, you should endeavor to fix warnings in your code because a future release of the compiler could make it an error. Fixing warnings will make you a better programmer.

Sometimes the warning will be in a library code. Again, for now your code will compile and run, but warnings in libraries is an example of lazy coding. You can try to give feedback to the library writer but many have stopped doing any maintenance years prior.

Thanks for the help and for the future I will really delve deeper into arduino programming so that I can also help in the future instead of just asking for help

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.