Nelson Ferreira [Fri, 20 Jan 2012 02:51:25 +0000 (21:51 -0500)]
Coverity: Uninit: CID 603
* src/ui/lwlib/lwlib-Xaw.c (xaw_generic_callback): Make sure
user_data is either initialized or not used :)
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 02:44:23 +0000 (21:44 -0500)]
Fix get_dyna_doc CHAR_IO issue sync
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Thu, 19 Jan 2012 01:29:50 +0000 (11:29 +1000)]
Coding style cleanups from Aidan
* from-aidan:
Improve conformance with usual coding style in effi.c.
Aidan Kehoe [Wed, 18 Jan 2012 12:04:17 +0000 (22:04 +1000)]
Improve conformance with usual coding style in effi.c.
Qabcdef should hold the perfectly normal, interned symbol abcdef, its
C variable should not be named Q_abcdef, that would imply the keyword
:abcdef.
* effi.c:
Only declare the symbols corresponding to foreign types if they're
not declared elsewhere. Follow the usual convention as above.
* effi.c (FFI_TPTR): Change symbol names here.
* effi.c (Fffi_basic_type_p): Ditto.
* effi.c (ffi_canonicalise_type): Ditto.
* effi.c (Fffi_size_of_type): Ditto.
* effi.c (Fmake_ffi_object): Ditto.
* effi.c (Fffi_make_pointer): Ditto.
* effi.c (Fffi_load_library): Ditto.
* effi.c (ffi_type_align): Ditto.
* effi.c (ffi_fetch_foreign): Ditto.
* effi.c (Fffi_fetch): Ditto.
* effi.c (Fffi_aref): Ditto.
* effi.c (Fffi_store): Ditto.
* effi.c (Fffi_aset): Ditto.
* effi.c (Fffi_address_of): Ditto.
* effi.c (Fffi_lisp_object_to_pointer): Ditto.
* effi.c (extffi_setup_argument): Ditto.
* effi.c (Fx_device_display): Ditto.
* effi.c (ffi_callback_call_x86): Ditto.
* effi.c (Fffi_make_callback): Ditto.
* effi.c (syms_of_ffi): Use DEFSYMBOL where appropriate, document an
oddity with Qffiobjectp.
* general-slots.h: Move Qshort, Qvoid here.
* lisp.h: Remove Qshort, Qvoid from here.
* map.c: Ditto.
* map.c (map_LTX_init): Ditto.
* mule/file-coding.c: Ditto.
* mule/file-coding.c (syms_of_file_coding): Ditto.
* mule/file-coding.h: Ditto.
Signed-off-by: Aidan Kehoe <kehoea@parhasard.net>
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Wed, 18 Jan 2012 23:38:10 +0000 (09:38 +1000)]
Coverity fixes from Nelson
* merges:
Coverity: FORWARD NULL: CID 54, 53, 52
Coverity: Forward NULL: CID 59, 58, 56
Coverity: CHAR_IO: CID 5,6,7,9
Coverity: UNINIT: CID 393
Coverity: UNINIT: CID 397
Coverity: UNINIT: CID 398
Coverity: UNINIT: CID 399
Coverity: Uninit: CID 400
Coverity: UNINIT: CID 401
Fix build
Fix build
Coverity: UNINIT: CID 402
Coverity: UNINIT: CID 403
Coverity: UNINIT: CID 405, 404
Coverity: UNUSED: CID 427
Coverity: Forward NULL: CID 439
Coverity: UNINIT: CID 599
Coverity: UNINIT: CID 600
Coverity: UNINIT: CID 601
Nelson Ferreira [Wed, 18 Jan 2012 20:34:07 +0000 (15:34 -0500)]
Coverity: FORWARD NULL: CID 54, 53, 52
* src/ui/X11/xgccache.c (gc_cache_lookup): Refactor abort() flow
through to shut up coverity.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 20:29:11 +0000 (15:29 -0500)]
Coverity: Forward NULL: CID 59, 58, 56
* src/ui/lwlib/lwlib-Xaw.c (xaw_generic_callback): Make sure you
do not dereference possible NULL val.
* src/ui/lwlib/lwlib-Xaw.c (wm_delete_window): Make sure widget
and kids are only used when valid.
* src/ui/lwlib/lwlib.c (replace_widget_value_tree): Make sure node
is only used if != NULL.
* src/ui/lwlib/lwlib.c (lw_map_widget_values): Make sure info is
only used if != NULL.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 19:51:21 +0000 (14:51 -0500)]
Coverity: CHAR_IO: CID 5,6,7,9
* lib-src/make-docfile.c (skip_white): Use proper return type of getc
* lib-src/make-docfile.c (read_lisp_symbol): Ditto
* src/signal.c (interrupt_signal): Ditto
* lib-src/make-docfile.c (scan_c_file): Do proper casting
* lib-src/make-docfile.c (get_dyna_doc): Let the casting
implementation do the truncation.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:17:03 +0000 (13:17 -0500)]
Merge branch 'njsf-cov' into for-steve
Nelson Ferreira [Wed, 18 Jan 2012 18:11:14 +0000 (13:11 -0500)]
Coverity: UNINIT: CID 393
* src/print.c (write_string_to_stdio_stream): handle the case
where the transcoding fails.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:06:23 +0000 (13:06 -0500)]
Coverity: UNINIT: CID 397
* src/buffer.c (directory_is_current_directory): Handle the case
of failed transcoding by attempting to use the non-transcoded
version. There is a high chance it is proper. Worst case it will
also fail, like the bad conversion would have prompted.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:02:11 +0000 (13:02 -0500)]
Coverity: UNINIT: CID 398
* src/effi.c (Fffi_store): Make sure tmp is only used in the mule
case if transcoding was proper.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:00:56 +0000 (13:00 -0500)]
Coverity: UNINIT: CID 399
* src/effi.c (Fffi_store): Make sure val_ext is only used if
transcoding was successful.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:58:57 +0000 (12:58 -0500)]
Coverity: Uninit: CID 400
* src/emacs.c (decode_path): make sure to return Qnil if
transcoding failed.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:57:36 +0000 (12:57 -0500)]
Coverity: UNINIT: CID 401
* src/media/media.c (Fmake_media_stream): make sure the stream is
only created if transcoding was ok.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:51:55 +0000 (12:51 -0500)]
Merge branch 'njsf-cov' into for-steve
Nelson Ferreira [Wed, 18 Jan 2012 17:35:32 +0000 (12:35 -0500)]
Fix build
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:34:57 +0000 (12:34 -0500)]
Fix build
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:26:44 +0000 (12:26 -0500)]
Coverity: UNINIT: CID 402
* src/print.c (Falternate_debugging_output): Make sure to handle
the case where transcoding failed.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:23:45 +0000 (12:23 -0500)]
Coverity: UNINIT: CID 403
* src/ui/X11/gui-x.c (button_item_to_widget_value): Make sure
intname is only used if properly transcoded.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:22:43 +0000 (12:22 -0500)]
Coverity: UNINIT: CID 405, 404
* src/ui/X11/frame-x.c (x_set_frame_properties): Make sure extval
is only used if properly transcoded.
* src/ui/X11/select-x.c (lisp_data_to_selection_data): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:00:24 +0000 (12:00 -0500)]
Coverity: UNUSED: CID 427
* src/ui/insdel.c (init_buffer_text): Get rid of unused
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 16:57:17 +0000 (11:57 -0500)]
Coverity: Forward NULL: CID 439
* src/fns.c (concat): Manually skip and abort when
string_result_ptr is NULL. Coverity is actually right
here, because when we are in a fatal error handling,
assert will be a no-op, so we better just put an
abort for the other cases and not try to dereference...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 16:42:58 +0000 (11:42 -0500)]
Coverity: UNINIT: CID 599
* src/emacs.c (run_emacs_from_temacs): Make sure the arguments
were really transcoded before using them
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 16:39:21 +0000 (11:39 -0500)]
Coverity: UNINIT: CID 600
* src/ui/X11/objects-x.c (x_find_charset_font): Make sure intname
is only used if transcoding worked properly.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 16:37:32 +0000 (11:37 -0500)]
Coverity: UNINIT: CID 601
* src/ui/glyphs-eimage.c (jpeg_instantiate): Make sure bytes is
only used if properly transcoded.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Sun, 15 Jan 2012 04:52:10 +0000 (14:52 +1000)]
Coverity fixes from Nelson
* merges:
Add a couple of missing semicolons on last commit
Fix build
Add some sanity assertions to format conversions.
Coverity: UNINIT: CID 409,408,407,406
Coverity: UNINIT: CID 410
Coverity: UNREACHABLE: CID 426, 425, 424, 423, 422, 421
Coverity: UNINIT: CID 453
Coverity: Uninit: CID 473
Coverity: Char IO: CID 595
Coverity: No effect: CID 598
Coverity: LOCK: CID 597
Nelson Ferreira [Sun, 15 Jan 2012 03:48:58 +0000 (22:48 -0500)]
Add a couple of missing semicolons on last commit
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 03:45:25 +0000 (22:45 -0500)]
Fix build
* src/buffer.h (TO_EXTERNAL_FORMAT): Move assertion up so that
macro can be used as single statement.
* src/buffer.h (TO_INTERNAL_FORMAT): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 03:32:04 +0000 (22:32 -0500)]
Add some sanity assertions to format conversions.
* src/buffer.h (TO_EXTERNAL_FORMAT): Add additional assert of
validity after conversion.
* src/buffer.h (TO_INTERNAL_FORMAT): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 03:26:00 +0000 (22:26 -0500)]
Coverity: UNINIT: CID 409,408,407,406
* src/ui/glyphs-eimage.c (rawrgb_instantiate): Only instantiate
image if the data was properly transcoded.
* src/ui/glyphs-eimage.c (png_instantiate): Ditto. In this case,
signal_image_error is best due to complexity.
* src/ui/glyphs-eimage.c (gif_instantiate): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 03:12:48 +0000 (22:12 -0500)]
Coverity: UNINIT: CID 410
* src/ui/glyphs-eimage.c (rawrgba_instantiate): Make sure data is
only used if conversion was proper.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 03:05:53 +0000 (22:05 -0500)]
Coverity: UNREACHABLE: CID 426, 425, 424, 423, 422, 421
* src/openssl.c (ossl_digest_fun): Just appease Coverity and add
do the while(0)...
* src/openssl.c (ossl_cipher_fun): Ditto.
* src/openssl.c (OSSL_CHECK_PROCESS): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 02:56:20 +0000 (21:56 -0500)]
Coverity: UNINIT: CID 453
* src/ui/glyphs-eimage.c (tiff_instantiate): Make sure file is
properly encoded before using it. This one is a bit uglier due to
the custom unwind here for error handling.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 02:47:51 +0000 (21:47 -0500)]
Coverity: Uninit: CID 473
* src/media/media-sndfile.c (media_sndfile_open): Make sure to
only call sf_open if file name was properly converted.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 02:43:54 +0000 (21:43 -0500)]
Coverity: Char IO: CID 595
* lib-src/make-docfile.c (get_dyna_doc): Make sure to properly
downcast the result of getc to char, after checking for its
validity (ie != -1).
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 02:37:21 +0000 (21:37 -0500)]
Coverity: No effect: CID 598
* src/media/media-mad.c (media_mad_open): Use long for result of
ftell. Previous use of size_t could cause a bad ftell to be
considered a maximum size media file... Later the positive size has
to be cast to size_t for storage in the structure.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sun, 15 Jan 2012 02:27:31 +0000 (21:27 -0500)]
Coverity: LOCK: CID 597
* src/media/sound-esd.c (sound_esd_play): Add missing unlock
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Sun, 15 Jan 2012 02:09:23 +0000 (12:09 +1000)]
Merge branch 'libsrc-culling'
* libsrc-culling:
Get rid of crusty old stuff from lib-src.
Steve Youngs [Sun, 15 Jan 2012 01:56:36 +0000 (11:56 +1000)]
Get rid of crusty old stuff from lib-src.
We inherited a boat load of stuff in lib-src when we forked from XEmacs,
it's high time we got rid of all that cave-man bit-rot. This changeset
gets rid of the stuff in lib-src that nobody under the age of 30 has even
heard of, let alone ever used.
* lib-src/Makefile.am (dist_bin_SCRIPTS): Removed.
* lib-src/Makefile.am (dist_archlib_SCRIPTS): Removed.
* lib-src/Makefile.am (stage1): Remove $dist_bin_SCRIPTS.
* etc/Makefile.am (dist_manone_DATA): Remove gnuattach.1,
gnudoit.1.
* etc/gnuserv.1: Remove mention of gnudoit/gnuattach
* lib-src/gnuserv.c (permitted): Don't call it 'gnudoit' in error
string, it's 'gnuclient'.
* lib-src/gnuserv.c (handle_internet_request): Ditto.
* lib-src/gnuclient.c (pass_signal_to_emacs): Call it 'gnuclient'
in error string.
* lisp/gnuserv.el: Remove mention of gnudoit.
* lisp/menubar-items.el (default-menubar): Call it gnuclient for
remote Emacs-W3 entry.
* etc/README: Remove mention of gnudoit, gnuattach
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 14 Jan 2012 06:35:02 +0000 (16:35 +1000)]
Contrib git conveniences from Nelson
* merges:
Update README. Give novice advice in git-to-steve.sh
Add the sample git post-receive hook and update README
Add clear copyright notices to the scripts I contributed
Fix build
Nelson Ferreira [Sat, 14 Jan 2012 05:29:29 +0000 (00:29 -0500)]
Update README. Give novice advice in git-to-steve.sh
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 14 Jan 2012 05:04:35 +0000 (00:04 -0500)]
Add the sample git post-receive hook and update README
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 14 Jan 2012 04:45:45 +0000 (23:45 -0500)]
Add clear copyright notices to the scripts I contributed
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 14 Jan 2012 01:01:20 +0000 (20:01 -0500)]
Merge branch 'master' of git.sxemacs.org/sxemacs into for-steve
Steve Youngs [Sat, 14 Jan 2012 01:00:28 +0000 (11:00 +1000)]
Merge branch 'trivial'
* trivial:
missing paren
Steve Youngs [Sat, 14 Jan 2012 01:00:12 +0000 (11:00 +1000)]
missing paren
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Nelson Ferreira [Sat, 14 Jan 2012 00:51:20 +0000 (19:51 -0500)]
Fix build
* src/media/media-sox.c (media_sox_open): Fix stupid typo
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Fri, 13 Jan 2012 23:58:52 +0000 (09:58 +1000)]
Coverity fixes from Nelson
* merges:
Coverity: UNINIT: CID 474
Coverity: DEADCODE: CID 578
Coverity: Checked return: CID 582
Coverity: Missing lock: CID 584
Coverity: Negative Returns: CID 585
Coverity: UNINIT: CID 592
Coverity: NO_EFFECT: CID 594
Coverity: UNINIT: CID 593 Make sure file name is not used uninitialized. : Negative Returns: CID 586: Make sure file size is proper
Nelson Ferreira [Fri, 13 Jan 2012 22:59:37 +0000 (17:59 -0500)]
Coverity: UNINIT: CID 474
* src/media/media-sox.c: make sure file conversion is proper
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 22:56:57 +0000 (17:56 -0500)]
Coverity: DEADCODE: CID 578
* src/print.c (SXE_VSNPRINT_VA): Fix the macro so that error in
snprintf is actually detected, instead of masked because of the
buffer growth loop.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 22:51:16 +0000 (17:51 -0500)]
Coverity: Checked return: CID 582
* src/media/media-internal.c (parsewave): Check the return of
waverequire, because we are trying to align the stream, but it may
still be fatal. Also fix the "flow" through of fatal error parsing
WAVE file in case wvSoundChuck which do not sound proper.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 22:43:25 +0000 (17:43 -0500)]
Coverity: Missing lock: CID 584
* src/media/sound-esd.c (sound_esd_play): Surround play_state
change with the necessary lock.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 22:41:25 +0000 (17:41 -0500)]
Coverity: Negative Returns: CID 585
* src/media/media-internal.c (media_internal_analyse_stream): Only
close the fd if it is valid, ie >= 0.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 22:37:14 +0000 (17:37 -0500)]
Coverity: UNINIT: CID 592
* src/media/media-internal.c (media_internal_analyse_stream): Make
sure that only if conversion to external format is successful we
try to open the file otherwise return as if file open failed.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 22:24:14 +0000 (17:24 -0500)]
Coverity: NO_EFFECT: CID 594
* lib-src/gnuslib.c (connect_to_unix_server): Use int for sz which
is the proper return type of snprintf.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 22:22:09 +0000 (17:22 -0500)]
Coverity: UNINIT: CID 593 Make sure file name is not used uninitialized.
: Negative Returns: CID 586: Make sure file size is proper
* src/media/media-mad.c (media_mad_open): Guard fopen against bad
EXTERNAL_FORMAT conversion.
Also make sure that if ftell is not successful the function terminates
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 13 Jan 2012 05:48:40 +0000 (00:48 -0500)]
Coverity: CHAR_IO: CID 595
* lib-src/make-docfile.c (get_dyna_doc): Make explicit the discard
of non existing bits on the getc call assignment to the saved
string.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Thu, 12 Jan 2012 15:38:58 +0000 (01:38 +1000)]
Coverity fixes from Nelson
* merges:
Coverity: NEGATIVE_RETURNS: CID 588
Coverity: NULL returns: CID 589
Coverity: Resource leak: CID 590
Coverity: Resource leak: CID 591
Nelson Ferreira [Thu, 12 Jan 2012 15:23:40 +0000 (10:23 -0500)]
Coverity: NEGATIVE_RETURNS: CID 588
* src/ui/TTY/gpmevent.c (restore_gpm_state): Make sure that fd is
>= 0 before accesing the state array.
* src/ui/TTY/gpmevent.c (store_gpm_state): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 15:19:15 +0000 (10:19 -0500)]
Coverity: NULL returns: CID 589
* src/process-unix.c (allocate_pty): Make sure slave_name is not
NULL, since that is a possible return from ttyname.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 15:14:34 +0000 (10:14 -0500)]
Coverity: Resource leak: CID 590
* src/media/media-internal.c (media_internal_analyse_stream): free
data in the case of failed open.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 15:12:50 +0000 (10:12 -0500)]
Coverity: Resource leak: CID 591
* src/media/media-mad.c (media_mad_open): free sd on unknown driver.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Thu, 12 Jan 2012 14:54:28 +0000 (00:54 +1000)]
Compiler Warning fixes from Nelson
* merges:
Fix switch warnings in xlwscrollbar
Fix switch warnings in media
Remove warnings
Nelson Ferreira [Thu, 12 Jan 2012 13:29:59 +0000 (08:29 -0500)]
Fix switch warnings in xlwscrollbar
* src/ui/lwlib/xlwscrollbar.c (call_callbacks): Add default to switch.
* src/ui/lwlib/xlwscrollbar.c (timer): Init reason to
XmCR_NONE. Assert that ARM_NONE cannot happen in switch.
* src/ui/lwlib/xlwscrollbar.c (Select): Add fall-through case for
BUTTON_NONE. Add default case for another switch.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 13:27:26 +0000 (08:27 -0500)]
Fix switch warnings in media
* src/media/media.c: New Qunavailable symbol.
* src/media/media.c (Fmedia_properties): Default driver to
Qunavailable. Add case labels for Xine and Gstreamer.
* src/media/media.c (syms_of_media): init Qunavailable.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 13:25:00 +0000 (08:25 -0500)]
Remove warnings
* src/regex.c (POP_FAILURE_POINT): Move DEBUG_STATEMENT to comply
with C variable declaration rules. Cast the POP_FAILURE_POINTER return
to proper const-ness.
* src/regex.c (re_match_2_internal): Make re_char *'s d and dend
const. Make scope p2 char* const. Make pdummy and sdummy const.
Remove old comment.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Thu, 12 Jan 2012 05:57:56 +0000 (15:57 +1000)]
Improved assertions from Nelson
* merges:
Improved assert messages
Nelson Ferreira [Thu, 12 Jan 2012 05:22:28 +0000 (00:22 -0500)]
Merge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxemacs into for-steve
Steve Youngs [Thu, 12 Jan 2012 05:04:17 +0000 (15:04 +1000)]
Coverity fixes from Nelson
* merges:
Coverity: Reverse INULL: CID 204
Coverity: Reverse INULL: CID:207
Coverity: Reverse Negative: CID:209
COVERITY: Forward NULL: CID:40
COVERITY: Forward NULL CID:46
COVERITY: SECURE_TEMP - CID:345
Small docstring update
Nelson Ferreira [Thu, 12 Jan 2012 03:55:56 +0000 (22:55 -0500)]
Merge branch 'njsf-cov' into for-steve
Nelson Ferreira [Thu, 12 Jan 2012 03:54:57 +0000 (22:54 -0500)]
Coverity: Reverse INULL: CID 204
* modules/ase/ase-interval.c (_ase_unite_intervals_intr): Defer
the call to ase_cartesion_dimension so that it does not try to
derefence an invalid argument. As a side benefit, it will be
faster in the trivial cases.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 03:52:48 +0000 (22:52 -0500)]
Coverity: Reverse INULL: CID:207
* src/media/media.c (media_stream_finalise): Return immediately if the stream is NULL
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 03:51:06 +0000 (22:51 -0500)]
Coverity: Reverse Negative: CID:209
* src/mule/file-coding.c (coding_system_from_mask): Make sure cat
is >=0 before dereferencing in the loop.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 03:46:37 +0000 (22:46 -0500)]
COVERITY: Forward NULL: CID:40
* lib-src/ootags.c (analyse_regex): Return if regex_arg is NULL
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 03:38:35 +0000 (22:38 -0500)]
Improved assert messages
* src/emacs.c: make the assertions_dont_abort a variable instead
of define.
* src/emacs.c (assert_failed): Make the 3rd nested assertion abort
instead of exit. Add an extra newline in the 2nd nested
assertion. Add a short backtrace of up to 32767 entries to the 2nd
nested assertion. Add a backtrace to to the 1st assert_failed.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 03:25:39 +0000 (22:25 -0500)]
Merge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxemacs into for-steve
Nelson Ferreira [Thu, 12 Jan 2012 03:25:12 +0000 (22:25 -0500)]
Merge branch 'njsf-cov' into for-steve
Nelson Ferreira [Thu, 12 Jan 2012 03:23:56 +0000 (22:23 -0500)]
COVERITY: Forward NULL CID:46
* src/print.c (write_string_to_stdio_stream): Add appropriate
diagnostics if no console nor stream provided...
* src/print.c (Fexternal_debugging_output): Explict NULL
initialization.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 01:57:09 +0000 (20:57 -0500)]
COVERITY: SECURE_TEMP - CID:345
* lib-src/movemail.c (lock_dot): Force umask to a sensible default, ie remove all group and other permissions
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Thu, 12 Jan 2012 01:37:50 +0000 (20:37 -0500)]
Small docstring update
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Thu, 12 Jan 2012 01:29:10 +0000 (11:29 +1000)]
Refactor lisp-initd from Nelson
* merges:
Fix bug 134:
Nelson Ferreira [Thu, 12 Jan 2012 00:22:27 +0000 (19:22 -0500)]
Bug 134: Remove lisp-initd-dir from startup.el. Usage of path-construct makes it work in lisp-initd.el
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Wed, 11 Jan 2012 04:51:51 +0000 (14:51 +1000)]
Close bug #134
* bug-134:
Ensure lisp-initd-dir is set early enough -- Closes bug #134
Steve Youngs [Wed, 11 Jan 2012 04:50:11 +0000 (14:50 +1000)]
Ensure lisp-initd-dir is set early enough -- Closes bug #134
* lisp/lisp-initd.el (lisp-initd-dir): Move to startup.el to
ensure it is set early enough to take affect.
* lisp/startup.el (lisp-initd-dir): Moved here from
lisp-initd.el.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Nelson Ferreira [Wed, 11 Jan 2012 00:27:51 +0000 (19:27 -0500)]
Merge branch 'master' of ssh://dio.dreamhost.com/~/repos.nelsonferreira.com/git/sxemacs into for-steve
Nelson Ferreira [Wed, 11 Jan 2012 00:13:08 +0000 (19:13 -0500)]
Fix bug 134:
* lisp/lisp-initd.el (lisp-initd-basename): replaces
lisp-initd-prefix, it is the basename of .el, .elc and dirnames
for the initd.
* lisp/lisp-initd.el (lisp-initd-dir): Delay file expansion, and
as such, just put as default the concat of user-init-directory and
lisp-initd-basename.
* lisp/lisp-initd.el (lisp-initd-compile): update argument
names. Do the proper directory filename expansion here. Use
lisp-initd-basename instead of the literal "init.d"
* lisp/lisp-initd.el (lisp-initd-compile): Issue warning when a
file was not included in compiled initd.el instead of the almost
unnoticeable message in the lossage.
* lisp/lisp-initd.el (lisp-initd-compile-and-load): Update
argument names and interactive usage.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Wed, 11 Jan 2012 00:08:36 +0000 (10:08 +1000)]
Another go at fixing 131
* merges:
Summary: fix, exec elisp in right thread context, closes bug #131 Keywords: bug fix #131
Summary: revert, bring asyneq handling of job events to original state Keywords: bug unfix #131
Summary: fix, another bug 131 attempt, dispatch the Keywords: bug fix #131
Sebastian Freundt [Tue, 10 Jan 2012 23:02:48 +0000 (23:02 +0000)]
Merge branch 'bug/131' into next
* bug/131:
Summary: fix, exec elisp in right thread context, closes bug #131 Keywords: bug fix #131
Summary: revert, bring asyneq handling of job events to original state Keywords: bug unfix #131
Summary: fix, another bug 131 attempt, dispatch the Keywords: bug fix #131
Sebastian Freundt [Tue, 10 Jan 2012 23:00:02 +0000 (23:00 +0000)]
Summary: fix, exec elisp in right thread context, closes bug #131
Keywords: bug fix #131
This changeset now most definitely fixes the sentinel issue of bug #131,
this time the elisp is even executed in the main thread.
* src/events/event-stream.c: move asyneq events (work started, ...) to
execute_internal_event(), was in Fdispatch_event()
Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
Steve Youngs [Tue, 10 Jan 2012 14:20:28 +0000 (00:20 +1000)]
Byte-compiler warning fixes
* lisp-warnfix:
Fix a couple of byte-compiler warnings.
Steve Youngs [Tue, 10 Jan 2012 14:18:05 +0000 (00:18 +1000)]
Fix a couple of byte-compiler warnings.
* lisp/package-get.el (pui-bootstrap): Call #'pui-list-packages
via #'declare-fboundp to silence byte-compiler.
Also remove fake version hack.
* lisp/ffi/ffi-wand.el (liquid-rescale): Call
#'Wand:liquid-rescale via #'declare-fboundp to silence
byte-compiler.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Sebastian Freundt [Tue, 10 Jan 2012 11:18:18 +0000 (11:18 +0000)]
Summary: revert, bring asyneq handling of job events to original state
Keywords: bug unfix #131
This effectively reverts all the changes made to the asyneq handling of
job events, and also brings back bug #131.
* src/events/worker-asyneq.c: revert
Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
Steve Youngs [Tue, 10 Jan 2012 11:15:51 +0000 (21:15 +1000)]
Nuke the bitrotten GTK
* gtk1-removal:
GTK eradication -- plug the holes left from removing gtk files.
GTK eradication -- file removal
GTK eradication -- the build chain.
Steve Youngs [Tue, 10 Jan 2012 10:48:15 +0000 (20:48 +1000)]
GTK eradication -- plug the holes left from removing gtk files.
This changeset fixes all the problems that were the by-product of removing
all the gtk related files from the repo.
* configure.ac: Remove spurious gtk comment
* etc/Makefile.am (dist_etc_DATA): Remove gtkrc.
* lib-src/gnuclient.c (main): No more gtk.
* lisp/cus-edit.el (custom-display): No more gtk.
* lisp/device.el (device-type): Remove spurious gtk comment.
* lisp/device.el (make-gtk-device): Removed.
* lisp/dragdrop.el (gtk-start-drag): Removed.
* lisp/dragdrop.el (gtk-start-drag-region): Removed.
* lisp/faces.el (face-equal): Don't check for gtk device type.
* lisp/faces.el (make-face-bold): Remove gtk case.
* lisp/faces.el (make-face-italic): Ditto.
* lisp/faces.el (make-face-bold-italic): Ditto.
* lisp/faces.el (make-face-unbold): Ditto.
* lisp/faces.el (make-face-unitalic): Ditto.
* lisp/faces.el (init-device-faces): Don't init gtk, it's not
there.
* lisp/faces.el (init-frame-faces): Ditto.
* lisp/faces.el (init-global-faces): Ditto.
* lisp/font-menu.el (font-menu-preferred-resolution): Remove gtk
* lisp/font-menu.el (font-menu-size-scaling): Ditto.
* lisp/font.el (font-window-system-mappings): Ditto.
* lisp/frame.el (make-frame-on-device): Remove spurious gtk doc string.
* lisp/gnuserv.el (gnuserv-main-frame-function): No more gtk.
* lisp/gnuserv.el (gnuserv-visible-frame-function): Ditto.
* lisp/gnuserv.el (make-x-device-with-gtk-fallback): Removed.
* lisp/gnuserv.el (gnuserv-edit-files): Remove gtk stuff.
* lisp/menubar-items.el (default-menubar): Remove sample.gtkrc
* lisp/minibuf.el (read-color-completion-table): No gtk.
* lisp/specifier.el: Ditto.
* src/emacs.c (console_type_create_select_gtk): Removed.
* src/emacs.c (main_1): No gtk.
* src/events/event-stream.c (init_event_stream): No gtk.
* src/events/events.c: Don't #include console-gtk.h
* src/events/events.c (event_equal): No gtk.
* src/events/events.c (event_hash): Ditto.
* src/events/events.c (format_event_object): Ditto.
* src/general-slots.h: Remove gtk.
* src/inline.c: Don't #include gtk headers.
* src/lisp.h: No gtk.
* src/lrecord.h: Remove gtk types.
* src/symsinit.h: Remove gtk.
* src/ui/console.c (select_console_1): No gtk.
* src/ui/console.h: Ditto.
* src/ui/console.h (CONSOLE_TYPESYM_WIN_P): No gtk.
* src/ui/device.c (Fmake_device): No gtk.
* src/ui/device.c (delete_device_internal): Ditto.
* src/ui/device.h (DEVICE_GTK_P): Removed.
* src/ui/device.h (CHECK_GTK_DEVICE): Removed.
* src/ui/device.h (CONCHECK_GTK_DEVICE): Removed.
* src/ui/device.h (DEVICE_MSWINDOWS_P): What the? REEEEMOOOOOVED!!!
* src/ui/device.h (CHECK_MSWINDOWS_DEVICE): Gah! Gone!
* src/ui/device.h (CONCHECK_MSWINDOWS_DEVICE): Sheesh! Outta here!
* src/ui/faces.c (complex_vars_of_faces): No gtk.
* src/ui/frame.h (FRAME_GTK_P): Removed.
* src/ui/frame.h (CHECK_GTK_FRAME): Removed.
* src/ui/frame.h (CONCHECK_GTK_FRAME): Removed.
* src/ui/gutter.c (specifier_vars_of_gutter): No gtk.
* src/ui/redisplay.c (init_redisplay): No gtk.
* src/ui/toolbar.c: No gtk.
* src/ui/window.c (specifier_vars_of_window): Ditto.
* tests/Makefile.am (gtk_tests): Removed.
* tests/Makefile.am (EXTRA_DIST): Removed gtk tests
* src/events/events.h: Don't #include gdk stuff.
* m4/sxe-aux.m4 (__SXE_MAKE_ADDER): Nuke gtk.
* src/sysfile.h: No gtk.
* src/ui/glyphs.c (pixmap_to_lisp_data): Remove gtk version.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Sebastian Freundt [Tue, 10 Jan 2012 09:23:10 +0000 (09:23 +0000)]
Summary: fix, another bug 131 attempt, dispatch the
Keywords: bug fix #131
* src/events/worker-asyneq.c: dispatch directly
Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
Steve Youngs [Tue, 10 Jan 2012 08:23:16 +0000 (18:23 +1000)]
GTK eradication -- file removal
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Tue, 10 Jan 2012 07:43:57 +0000 (17:43 +1000)]
GTK eradication -- the build chain.
The GTK code in SXEmacs has been stagnating since 2000, 4 years before
SXEmacs even came into existance. It was GTK version 1. Nobody, nowhere
uses GTKv1 any more, so this stuff is going to /dev/null hell!
* src/ui/Makefile.am: Don't add `Gtk' to SUBDIRS
* src/Makefile.am: Don't add gtk to pdumplibs.
* lisp/Makefile.am (corelispels): Remove all the gtk/gnome elisp.
* lisp/dumped-lisp.el: Don't dump any gtk lisp.
* m4/sxe-summary.m4: No more gtk.
* m4/sxe-gui.m4 (SXE_CHECK_XT_DEPENDENCIES): Remove gtk stuff.
* m4/sxe-gui.m4 (SXE_CHECK_GTK_DEPENDENCIES): Removed.
* m4/sxe-gui.m4 (SXE_CHECK_UI_SUFFICIENCY): Don't subst gtk obj's
* configure.ac: Remove all gtk nonsense.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Tue, 10 Jan 2012 00:44:42 +0000 (10:44 +1000)]
Really fix bug 131, for real this time
* crash-test:
Fix the fix that fixes the fix to fix bug 131
Steve Youngs [Tue, 10 Jan 2012 00:43:58 +0000 (10:43 +1000)]
Fix the fix that fixes the fix to fix bug 131
* src/events/worker-asyneq.c (eq_worker_eaten_myself): Don't call
asyneq_handle_event()
* src/events/worker-asyneq.c (eq_worker_work_started): Ditto.
Signed-off-by: Steve Youngs <steve@sxemacs.org>