Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warnings in ta/desktops #13

Closed
MasterP-theGu opened this issue Jan 12, 2020 · 2 comments
Closed

Compiler warnings in ta/desktops #13

MasterP-theGu opened this issue Jan 12, 2020 · 2 comments
Labels
type:enhancement Augmenting an existing feature

Comments

@MasterP-theGu
Copy link

I guess you can live with the German version of the standard parts of the message...

make[3]: Verzeichnis „/home/peter/.git/fvwm3/modules/FvwmIdent“ wird betreten
  CC       FvwmIdent.o
FvwmIdent.c: In Funktion »MakeList«:
FvwmIdent.c:1411:11: Warnung: Argument 1 ist als »restrict« markiert, wird aber auch in Argument 3 übergeben [-Wrestrict]
 1411 |   sprintf(ewmh_init_state, "%s %lu ",
      |           ^~~~~~~~~~~~~~~
 1412 |    ewmh_init_state, target.ewmh_hint_desktop);
      |    ~~~~~~~~~~~~~~~
Auf höchster Ebene:
FvwmIdent.c:116:13: Warnung: »xin_str« definiert, aber nicht verwendet [-Wunused-variable]
  116 | static char xin_str[10];
      |             ^~~~~~~
FvwmIdent.c: In Funktion »MakeList«:
FvwmIdent.c:1411:32: Warnung: »%lu«-Direktive schreibt zwischen 1 und 3 Bytes in eine Region der Größe zwischen 0 und 511 [-Wformat-overflow=]
 1411 |   sprintf(ewmh_init_state, "%s %lu ",
      |                                ^~~
FvwmIdent.c:1411:28: Anmerkung: Direktiven-Argument im Bereich [0, 255]
 1411 |   sprintf(ewmh_init_state, "%s %lu ",
      |                            ^~~~~~~~~
FvwmIdent.c:1411:3: Anmerkung: »sprintf« hat zwischen 4 und 517 Bytes in das Ziel der Größe 512 ausgegeben
 1411 |   sprintf(ewmh_init_state, "%s %lu ",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1412 |    ewmh_init_state, target.ewmh_hint_desktop);
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CCLD     FvwmIdent
make[3]: Verzeichnis „/home/peter/.git/fvwm3/modules/FvwmIdent“ wird verlassen
``make[3]: Verzeichnis „/home/peter/.git/fvwm3/modules/FvwmPager“ wird betreten
  CC       FvwmPager.o
FvwmPager.c: In Funktion »list_add«:
FvwmPager.c:667:47: Warnung: Format »%d« erwartet Argumenttyp »int«, aber Argument 3 hat Typ »long unsigned int« [-Wformat=]
  667 |   fprintf(stderr, "monitor was null with ID: %d\n", cfgpacket->monitor_id);
      |                                              ~^     ~~~~~~~~~~~~~~~~~~~~~
      |                                               |              |
      |                                               int            long unsigned int
      |                                              %ld
FvwmPager.c: In Funktion »list_configure«:
FvwmPager.c:711:48: Warnung: Format »%d« erwartet Argumenttyp »int«, aber Argument 3 hat Typ »long unsigned int« [-Wformat=]
  711 |    fprintf(stderr, "monitor was null with ID: %d\n", cfgpacket->monitor_id);
      |                                               ~^     ~~~~~~~~~~~~~~~~~~~~~
      |                                                |              |
      |                                                int            long unsigned int
      |                                               %ld
  CC       x_pager.o
x_pager.c: In Funktion »AddNewWindow«:
x_pager.c:2007:49: Warnung: »mon« könnte in dieser Funktion uninitialisiert verwendet werden [-Wmaybe-uninitialized]
 2007 |   if (monitor_to_track != NULL && (t->m != NULL && t->m != mon))
      |                                   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
  CCLD     FvwmPager
make[3]: Verzeichnis „/home/peter/.git/fvwm3/modules/FvwmPager“ wird verlassen
make[4]: Verzeichnis „/home/peter/.git/fvwm3/modules/FvwmScript“ wird betreten
  CC       FvwmScript.o
In Funktion »ReadFvwmScriptArg«,
    eingefügt von »ReadFvwmScriptArg« beiFvwmScript.c:1302:6:
FvwmScript.c:1320:31: Warnung: »strncpy« angegebene Grenze hängt von der Länge des Quellarguments ab [-Wstringop-overflow=]
 1320 |     x11base->TabScriptId[0] = strncpy(x11base->TabScriptId[0],argv[7],
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1321 |         strlen(argv[7])-2);
      |         ~~~~~~~~~~~~~~~~~~     
FvwmScript.c: In Funktion »ReadFvwmScriptArg«:
FvwmScript.c:1321:9: Anmerkung: Länge wird hier berechnet
 1321 |         strlen(argv[7])-2);
      |         ^~~~~~~~~~~~~~~
  CC       Instructions.o
Instructions.c: In Funktion »WriteToFile«:
Instructions.c:1738:5: Warnung: Argument 1 ist als »restrict« markiert, wird aber auch in Argument 3 übergeben [-Wrestrict]
 1738 |     sprintf(buf,"%s\n%s%d\n",buf,StrBegin,getpid());
      |     ^~~~~~~
Instructions.c:1739:5: Warnung: Argument 1 ist als »restrict« markiert, wird aber auch in Argument 3 übergeben [-Wrestrict]
 1739 |     sprintf(buf,"%s%s",buf,arg[1]);
      |     ^~~~~~~
Instructions.c:1740:5: Warnung: Argument 1 ist als »restrict« markiert, wird aber auch in Argument 3 übergeben [-Wrestrict]
 1740 |     sprintf(buf,"%s%s\n",buf,StrEnd);
      |     ^~~~~~~
Instructions.c: In Funktion »FuncGetOutput«:
Instructions.c:363:7: Warnung: »strncpy« angegebene Grenze 255 ist genau die Größe des Ziels [-Wstringop-truncation]
  363 |       strncpy(Command,cmndbuf,255);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC       libyywrap.o
  CC       scanner.o
  CC       script.o
  CCLD     FvwmScript
make[4]: Verzeichnis „/home/peter/.git/fvwm3/modules/FvwmScript“ wird verlassen

If it's related: the version that is made with these messages starts nicely, but neither FvwmButtons on its own nor the RightPanel work - components seem to start, but are immediately lost.

@ThomasAdam
Copy link
Member

Thanks -- apart from the warnings in FvwmPager the rest will be fixed in time.

@ThomasAdam
Copy link
Member

I've now fixed this on 'ta/desktops' for the FvwmPager-related warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Augmenting an existing feature
Projects
Status: Done
Development

No branches or pull requests

2 participants