danielb6611 / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

Missing headers, missing return value and broken variable assignments #345

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Here are some changesets fixing a number of smaller issues:

* missing headers in the input-sdl plugin and the ui-console
* a missing return value in the non-void resample function in the audio-sdl
plugin (please check first)
* broken variable assignments in the video-rice plugin

Original issue reported on code.google.com by gu...@berhoerster.name on 3 Mar 2010 at 8:43

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! Interesting.

Strange it doesn't make crash during compile.

What platform are you? How did you find this?

Patchs doesn't seem to have probs but richard will see it and choose what to do 
(I'm
not a dev ;) )

Original comment by dorian.f...@gmail.com on 4 Mar 2010 at 2:54

GoogleCodeExporter commented 8 years ago
I'm building with GCC on Linux, with -Wall these issues all just cause 
warnings. You
might want to grep build logs or compile with -Werror and friends as part of 
your QA
before doing a release.
Particularly the audio-sdl pluin patch needs review since I'm not fully sure 
what was
intended there.

Original comment by gu...@berhoerster.name on 4 Mar 2010 at 5:31

GoogleCodeExporter commented 8 years ago
Just build the projects with

CFLAGS="-Wall -Wextra" /usr/bin/make -C projects/unix/ all CC=cgcc

and you will see that everything wants a lot of love (you need the hg version to
allow appending of cflags - wahrhafts projects doesn't support it yet). The 
static
function stuff in the core can be interesting because it can lead to reduced 
code
size and sometimes also in performance optimization (less notable). The 'unused
parameter' stuff has to be ignored in most cases since the prototype defines 
how an
plugin function has to look like.

Original comment by sven@narfation.org on 4 Mar 2010 at 7:21

GoogleCodeExporter commented 8 years ago
Started to fix some of the warnings in the -core

Before
-rwxr-xr-x 1 sven sven 624688 Mar  4 20:23 projects/unix/libmupen64plus.so.2.0.0

After
-rwxr-xr-x 1 sven sven 616496 Mar  4 21:52 projects/unix/libmupen64plus.so.2.0.0

Compiles now cleanly with

LDFLAGS="-Wl,--no-undefined -Wl,--no-add-needed" CFLAGS="-Wall" /usr/bin/make -C
projects/unix/ all

Original comment by sven@narfation.org on 4 Mar 2010 at 8:57

Attachments:

GoogleCodeExporter commented 8 years ago
By the way. During the tests it was really frustrating that there is no 
dependency
tracking available at the moment. So every time I changed a header I had to 
cleanup
the whole project and then rebuild it. It is quite easy to fix and should help 
a lot
when working on the project. The dependency files will be created at the first 
run
(when dependency tracking isn't useful anyway) and should create nearly no 
overhead.

Original comment by sven@narfation.org on 4 Mar 2010 at 9:24

Attachments:

GoogleCodeExporter commented 8 years ago
I have the impression that your mods have been put in the svn (bitbucket). 
Maybe it's
you. :)
I don't know if richard seen this "issue" but I will notice him about that.

He is open to this kind of conversations but I suppose he don't have lot of 
time do
this kind of things (as all of us, he as a life).

About the dependency, I'm Win user so I (think I) don't have this prob with it.

So if you think you are able to work on this, you can do it and prupose this to
http://bitbucket.org/ ).

Don't hesitate to ask him about that! :)

Original comment by dorian.f...@gmail.com on 5 Mar 2010 at 9:38

GoogleCodeExporter commented 8 years ago
I've seen that on the tracker:

Add automatically dependency tracking for C/C++ files Every time a header is 
changed,
the user had to cleanup the whole project and then rebuild it. It is quite easy 
to
fix and should help a lot when working on the project. The dependency files 
will be
created at the first run (when dependency tracking isn't useful anyway) and 
should
create nearly no overhead.

This has been had to the makefile:  

# build dependency files
CFLAGS += -MD
-include $(OBJECTS:.o=.d)

I suppose it's what you were talking about?

Original comment by dorian.f...@gmail.com on 5 Mar 2010 at 10:49

GoogleCodeExporter commented 8 years ago
Yes, committed some of the minor stuff yesterday. Should be a starting point for
this issue.

Original comment by sven@narfation.org on 5 Mar 2010 at 11:17

GoogleCodeExporter commented 8 years ago
All of these patches have been committed, a long time ago.

Original comment by richard...@gmail.com on 29 Dec 2010 at 1:24